[Mono-bugs] [Bug 75080][Nor] New - methods with enum names confuse mcs and gmcs

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 28 02:36:45 EDT 2005


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 dsilva at ccs.neu.edu.

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

--- shadow/75080	2005-05-28 02:36:45.000000000 -0400
+++ shadow/75080.tmp.1205	2005-05-28 02:36:45.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 75080
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: dsilva at ccs.neu.edu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: methods with enum names confuse mcs and gmcs
+
+Description of Problem:
+
+If this program is valid, then mcs and gmcs have a bug.  If it's invalid,
+then the error message is a little confusing...
+
+
+dsilva at ds:/tmp$ cat enum.cs
+public class App {
+
+  public static void Main() {}
+
+  SomeEnum SomeEnum() {
+    return SomeEnum.First;
+  }
+
+}
+
+enum SomeEnum { First, Second };
+
+dsilva at ds:/tmp$ mcs enum.cs
+enum.cs(6) error CS0117: `System.Object' does not contain a definition for
+`First'
+Compilation failed: 1 error(s), 0 warnings
+dsilva at ds:/tmp$ gmcs enum.cs
+enum.cs(6) error CS0117: `System.Object' does not contain a definition for
+`First'
+Compilation failed: 1 error(s), 0 warnings
+dsilva at ds:/tmp$


More information about the mono-bugs mailing list