[Mono-bugs] [Bug 29483][Maj] New - Compiler allows instance methods to be called without an instance.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
27 Aug 2002 00:45:27 -0000


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

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

--- shadow/29483	Mon Aug 26 20:45:27 2002
+++ shadow/29483.tmp.8001	Mon Aug 26 20:45:27 2002
@@ -0,0 +1,36 @@
+Bug#: 29483
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Misc
+AssignedTo: martin@gnome.org                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Compiler allows instance methods to be called without an instance.
+
+The following program is compiled by MCS, while it should not:
+
+class X {
+
+	void m ()
+	{
+	}
+
+	static void Main ()
+	{
+		X.m ();
+	}
+}
+
+Notice that this only happens if m is prefixed with "X." here, it works
+otherwise.
+
+The code above *should* emit an error.