]> Cypherpunks repositories - gostls13.git/commitdiff
bug136 unfixed
authorRuss Cox <rsc@golang.org>
Wed, 29 Jul 2009 22:39:05 +0000 (15:39 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 29 Jul 2009 22:39:05 +0000 (15:39 -0700)
R=austin
DELTA=35  (21 added, 14 deleted, 0 changed)
OCL=32469
CL=32474

test/bugs/bug136.go [moved from test/fixedbugs/bug136.go with 66% similarity]
test/golden.out

similarity index 66%
rename from test/fixedbugs/bug136.go
rename to test/bugs/bug136.go
index 5846c654b9002a711fc306132b82e7ab0357db7f..7491b65d88fc3e6c199ae729e95f660887e6c47d 100644 (file)
@@ -10,6 +10,13 @@ func main() {
        L: ;  // ';' terminates empty statement => L does not apply to for loop
        for i := 0; i < 10; i++ {
                println(i);
-               break L  // L does not apply to for loop
+               break L;  // ERROR "L"
+       }
+
+       L1: { // L1 labels block => L1 does not apply to for loop
+               for i := 0; i < 10; i++ {
+                       println(i);
+                       break L1;  // ERROR "L1"
+               }
        }
 }
index 29b4bcab78100a04ce1fc9f13e700a70319ee7fa..8cadc26b90a22b2297882f5558b84116038bc299 100644 (file)
@@ -220,9 +220,6 @@ fixedbugs/bug133.dir/bug2.go:11: undefined: bug0.T field i
 fixedbugs/bug133.dir/bug2.go:11: illegal types for operand: RETURN
        int
 
-=========== fixedbugs/bug136.go
-fixedbugs/bug136.go:9: invalid break label L
-
 =========== fixedbugs/bug148.go
 2 3
 interface is main.T, not main.T·bug148·1
@@ -235,6 +232,9 @@ panic PC=xxx
 =========== bugs/bug132.go
 BUG: compilation succeeds incorrectly
 
+=========== bugs/bug136.go
+BUG: errchk: bugs/bug136.go:15: missing expected error: 'L1'
+
 =========== bugs/bug159.go
 abc: expected 4 5 6 got 4 4 -4
 BUG: bug159