[Mono-bugs] [Bug 59424][Nor] New - Incorrect error: The label 'c' shadows another label by the same name in a containing scope.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 1 Jun 2004 20:33:26 -0400 (EDT)


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=59424

--- shadow/59424	2004-06-01 20:33:26.000000000 -0400
+++ shadow/59424.tmp.2024	2004-06-01 20:33:26.000000000 -0400
@@ -0,0 +1,32 @@
+Bug#: 59424
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Incorrect error: The label 'c' shadows another label by the same name in a containing scope.
+
+class T {
+	static void Main ()
+	{
+		{ c: ; }
+		c: ;
+	}
+}
+
+Should compile. The second label def. does not hide the first one. We give:
+
+t.cs(4) error CS0158: The label 'c' shadows another label by the same name
+in a containing scope.
+
+CSC compiles