[Mono-bugs] [Bug 74623][Min] New - Compiler can't handle correctly attributes with long constructor arguments

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 15 Apr 2005 13:11:03 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by dominic_ullmann@hispeed.ch.

http://bugzilla.ximian.com/show_bug.cgi?id=74623

--- shadow/74623	2005-04-15 13:11:03.000000000 -0400
+++ shadow/74623.tmp.16405	2005-04-15 13:11:03.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 74623
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: XP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dominic_ullmann@hispeed.ch               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Compiler can't handle correctly attributes with long constructor arguments
+
+Description of Problem:
+The mono compiler generates invalid code if an attribute constructor has 
+a long argument and the attribute user tries to pass an int to the 
+attribute constructor.
+
+Steps to reproduce the problem:
+1. mcs /t:library /out:test1.dll Test.cs
+
+Actual Results:
+Test.cs(19) warning CS8023: The compiler can not encode this attribute 
+in .NET due to a bug in the .NET runtime. Try the Mono runtime. The 
+exception was: Value
+of argument 0 does not match parameter type: System.Int64 -> 1
+Compilation succeeded - 1 warning(s)
+
+In the compiled code, the attribute is not set on the class TestA at all. 
+The compiler has removed it.
+
+Expected Results:
+No compilation warning/problem. The attribute should be present on class 
+TestA.
+
+How often does this happen? 
+always
+
+Additional Information: