[Mono-bugs] [Bug 65766][Nor] New - const fields in static classes are ok
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 12 Sep 2004 14:32:27 -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 jluke@cfl.rr.com.
http://bugzilla.ximian.com/show_bug.cgi?id=65766
--- shadow/65766 2004-09-12 14:32:27.000000000 -0400
+++ shadow/65766.tmp.11814 2004-09-12 14:32:27.000000000 -0400
@@ -0,0 +1,34 @@
+Bug#: 65766
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: jluke@cfl.rr.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: const fields in static classes are ok
+
+In a static class a const field should not be flagged as an error.
+
+using System;
+
+static class T
+{
+ const int Foo = 1;
+
+ static void Main ()
+ {
+ }
+}
+
+$ mcs t.cs
+t.cs(5) error CS0708: 'T.Foo': cannot declare instance members in a static
+classCompilation failed: 1 error(s), 0 warnings