[Mono-bugs] [Bug 60637][Nor] New - Error compiling custom attributes with field array value

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 23 Jun 2004 11:41:49 -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=60637

--- shadow/60637	2004-06-23 11:41:49.000000000 -0400
+++ shadow/60637.tmp.13605	2004-06-23 11:41:49.000000000 -0400
@@ -0,0 +1,28 @@
+Bug#: 60637
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Error compiling custom attributes with field array value
+
+This program fails to compile with mcs:
+class MyAttribute : System.Attribute {
+        public char[] Prop;
+
+        [My (Prop = new char[] {'a'})]
+        static void Main () {
+        }
+}
+simple-prop-bug.cs(4) error CS0182: An attribute argument must be a
+constant expression, typeof expression or array creation expression