[Mono-bugs] [Bug 28562][Nor] Changed - type info lost with enum arguments to a custom attr that takes an object

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
12 Aug 2002 13:00:21 -0000


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 martin@gnome.org.

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

--- shadow/28562	Mon Aug 12 08:58:52 2002
+++ shadow/28562.tmp.14592	Mon Aug 12 09:00:21 2002
@@ -78,6 +78,29 @@
 type to create the reference representation of the enum value.
 
 ------- Additional Comments From martin@gnome.org  2002-08-12 08:58 -------
 Created an attachment (id=2093)
 MCS patch to encode the attribute with the correct enum type
 
+
+------- Additional Comments From martin@gnome.org  2002-08-12 09:00 -------
+The attached patch makes MCS encode the attribute using the correct enum type.  However, now reflection can't encode the attribute 
+anymore:
+
+----
+[martin@einstein work]$ mono ~/monocvs/mcs/mcs/mcs.exe --mcs-debug 4 Test.cs
+NEW CB: System.Reflection.MonoCMethod,System.Object[](All),System.Reflection.PropertyInfo[](System.Boolean 
+AllowMultiple),System.Object[](True),System.Reflection.FieldInfo[](),System.Object[]()
+NEW CB: 
+constructor,System.Object[](1),System.Reflection.PropertyInfo[](),System.Object[](),System.Reflection.FieldInfo[](),System.Object[]()
+NEW CB: 
+constructor,System.Object[](Empty),System.Reflection.PropertyInfo[](),System.Object[](),System.Reflection.FieldInfo[](),System.Object[]()
+Test.cs(4) warning CS-0023: The compiler can not encode this attribute in the Mono runtime
+        due to a known bug in it.  We know about the problem and will
+        fix it as soon as possible.
+NEW CB: 
+constructor,System.Object[](System.Enum),System.Reflection.PropertyInfo[](),System.Object[](),System.Reflection.FieldInfo[](),System.Object[]()
+Compilation succeeded - 1 warning(s)
+----
+
+Is this a reflection bug or am I still doing something wrong in MCS ?
+