[Mono-bugs] [Bug 52504][Wis] New - We do not flag CS0140 if the target label has a decl

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 14:20:32 -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 bmaurer@users.sf.net.

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

--- shadow/52504	2003-12-23 14:20:32.000000000 -0500
+++ shadow/52504.tmp.4545	2003-12-23 14:20:32.000000000 -0500
@@ -0,0 +1,33 @@
+Bug#: 52504
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: We do not flag CS0140 if the target label has a decl
+
+class a {
+	static void Main ()
+	{
+		goto foo;
+		foo: int i = 0;
+		foo: int a = 1;
+	}
+}
+
+Should not compile,
+on CSC it gives
+
+t.cs(7) error CS0140: The label 'foo' is a duplicate
+
+MCS will compile it.