[Mono-bugs] [Bug 59424][Nor] Changed - 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:36:16 -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.2066	2004-06-01 20:36:16.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 59424
 Product: Mono: Compilers
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -27,6 +27,16 @@
 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
+
+------- Additional Comments From bmaurer@users.sf.net  2004-06-01 20:36 -------
+This is weird, I do not think CSC is correct. The spec states:
+
+`The scope of a label is the whole block in which the label is
+declared, including any nested blocks. It is a compile-time error for
+two labels with the same name to have overlapping scopes.'
+
+The `whole block' in which the second `c' label is declared includes
+the first block.