[Mono-bugs] [Bug 69911][Wis] New - CS0592: CLSCompliant check is needed for enum fields

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 25 Nov 2004 08:18:19 -0500 (EST)

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 atsushi@ximian.com.


--- shadow/69911	2004-11-25 08:18:19.000000000 -0500
+++ shadow/69911.tmp.27413	2004-11-25 08:18:19.000000000 -0500
@@ -0,0 +1,47 @@
+Bug#: 69911
+Product: Mono: Compilers
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: atsushi@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: CS0592: CLSCompliant check is needed for enum fields
+The example code below is rejected by csc, while mcs passes it.
+using System;
+public enum Test
+        Foo,
+        Bar,
+        [CLSCompliant (false)]
+        __baz
+Actual Results:
+no CS0592 error.
+Expected Results:
+enumcls.cs(7,3): error CS0592: Attribute 'CLSCompliant' is not valid on this
+        declaration type. It is valid on 'assembly, module, class, struct,
+        constructor, method, property, field, event, interface, param,
+        return' declarations only.
+How often does this happen? 
+Additional Information:
+It was used in corlib/System.Runtime.InteropServices/UnmanagedType.cs.
+(already fixed)