[Mono-bugs] [Bug 41520][Nor] Changed - Fail to compiler constructors in attributes.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 29 Apr 2003 13:13:45 -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 lupus@ximian.com.

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

--- shadow/41520	Tue Apr 29 12:47:01 2003
+++ shadow/41520.tmp.30838	Tue Apr 29 13:13:45 2003
@@ -1,13 +1,13 @@
 Bug#: 41520
 Product: Mono/MCS
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: miguel@ximian.com               
 QAContact: mono-bugs@ximian.com
@@ -62,6 +62,30 @@
 I added/fixed the code to deal with arrays in custom attrs
 (both emit and read). Emit is tested only with an empty array,
 until mcs is fixed to actually compile the code.
 
 ------- Additional Comments From miguel@ximian.com  2003-04-29 12:47 -------
 I commited my changes to CVS.  The bug is fixed.
+
+------- Additional Comments From lupus@ximian.com  2003-04-29 13:13 -------
+Trivially changing the test makes the bug appear again (just inserted
+a null item in the array):
+using System;
+using System.Reflection;
+
+[AttributeUsage (AttributeTargets.All)]
+public class MineAttribute : Attribute {
+        public MineAttribute (Type [] t)
+        {
+        }
+}
+
+[Mine(new Type [] { typeof(int), null, typeof (string)})]
+public class Foo {
+        public static int Main ()
+        {
+                object[] attrs = typeof (Foo).GetCustomAttributes
+(typeof(MineAttribute), true);
+                return 0;
+        }
+}
+