[Mono-bugs] [Bug 52585][Min] New - CS0657: mcs allows attributes on class members which targets assembly
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 4 Jan 2004 11:48:45 -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 ginga@kit.hi-ho.ne.jp.
http://bugzilla.ximian.com/show_bug.cgi?id=52585
--- shadow/52585 2004-01-04 11:48:45.000000000 -0500
+++ shadow/52585.tmp.29247 2004-01-04 11:48:45.000000000 -0500
@@ -0,0 +1,43 @@
+Bug#: 52585
+Product: Mono/Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ginga@kit.hi-ho.ne.jp
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CS0657: mcs allows attributes on class members which targets assembly
+
+With MS csc, Attributes targeted for assembly (e.g. [assembly:CLSCompliant
+(true)]) is prohibited when it is specified on class members.
+Mono allows it.
+
+
+public class TestClass
+{
+ [assembly:System.CLSCompliant (true)]
+ public static void Main ()
+ {
+ }
+}
+
+Actual Results:
+Compilation succeeded.
+
+Expected Results:
+csc reports an error:
+
+asm.cs(3,2): error CS0657: 'assembly' is not a valid attribute location
+for this declaration. Valid attribute locations for this declaration
+are 'method, return'
+
+How often does this happen?
+always