[Mono-bugs] [Bug 28051][Wis] New - methods allowed to have the same name as container class.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
22 Jul 2002 00:18:28 -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=28051

--- shadow/28051	Sun Jul 21 20:18:28 2002
+++ shadow/28051.tmp.21526	Sun Jul 21 20:18:28 2002
@@ -0,0 +1,41 @@
+Bug#: 28051
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: methods allowed to have the same name as container class.
+
+class.cs AddMethod is not calling `Isvalid' on the name to verify
+whether it is ok to add the method.  
+
+So things like:
+
+
+using System;
+class X {
+	static void X ()
+	{
+		Console.WriteLine ("HOLA");
+	}
+
+	static void Main () { X (); }
+}
+
+Compile, but they should generate an error.
+
+The fix seems obvious, but we have to test that the fix wont break
+something else, and if it does, fix both things (I have a vague
+recollection of a possible problme, but it is very vague).
+
+Miguel.