[Mono-bugs] [Bug 36271][Nor] New - mcs allows access modifiers to static ctors

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 3 Jan 2003 16:36:53 -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 lupus@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=36271

--- shadow/36271	Fri Jan  3 16:36:53 2003
+++ shadow/36271.tmp.13979	Fri Jan  3 16:36:53 2003
@@ -0,0 +1,33 @@
+Bug#: 36271
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs allows access modifiers to static ctors
+
+mcs should not compile the following program.
+csc gives the following error:
+type-initializer-invoke.cs(5,22): error CS0515: 'Bar.Bar()': access
+modifiers are not allowed on static constructors
+
+using System;
+
+public class Bar {
+
+       public static Bar() {
+             System.Console.WriteLine( "Bar.Bar()" );
+       }
+
+       public static void Main () {}
+}