* test-329.cs: New test for #67412 (needs runtime update)
svn path=/trunk/mcs/; revision=37503
+2004-12-09 Marek Safar <marek.safar@seznam.cz>
+
+ * test-329.cs: New test for #67412.
+
2004-12-09 Martin Baulig <martin@ximian.com>
* Makefile: Disabled xml-022.cs and xml-028.cs.
# Martin Baulig will manually move them into TEST_SOURCES_common after merging the code into GMCS.
# He may also move some to TEST_EXCLUDE_net_2_0 if some of the merges are inappropriate for GMCS.
#
-NEW_TEST_SOURCES_common = xml-033
+NEW_TEST_SOURCES_common = xml-033 test-329
#
# Please do _not_ add any tests here - all new tests should go into NEW_TEST_SOURCES_common
--- /dev/null
+using System;
+
+[X (null)]
+class X : Attribute {
+ int ID;
+ public X () {}
+ public X (object o)
+ {
+ if (o == null)
+ ID = 55;
+ }
+
+ static int Main () {
+ object[] attrs = typeof(X).GetCustomAttributes(typeof (X),false);
+ if (attrs.Length != 1)
+ return 2;
+
+ X x = attrs [0] as X;
+ if (x.ID != 55)
+ return 2;
+
+ Console.WriteLine("OK");
+ return 0;
+ }
+}