]> Cypherpunks repositories - gostls13.git/commitdiff
Don't try to define the same label twice, as that produces a
authorIan Lance Taylor <iant@golang.org>
Tue, 17 Mar 2009 04:47:38 +0000 (21:47 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 17 Mar 2009 04:47:38 +0000 (21:47 -0700)
label redefinition error.

R=gri
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=26357
CL=26372

test/bugs/bug140.go
test/golden.out

index 614fabdc30669c961eb40eccfb91aa43c12b9c6a..33d1deb8a0c9efe06902d888ae4e8e760de0c8a0 100644 (file)
@@ -7,12 +7,12 @@
 package main
 
 func main() {
-       if {} else L: ;
-       if {} else L: main() ;
+       if {} else L1: ;
+       if {} else L2: main() ;
 }
 
 /*
 These should be legal according to the spec.
-bug140.go:6: syntax error near L
-bug140.go:7: syntax error near L
+bug140.go:6: syntax error near L1
+bug140.go:7: syntax error near L2
 */
index 8e4786c3cc5b84b0510ca23af597f121d7b34217..c41d2d9e17209d78de965fddaab18f7e3c903c17 100644 (file)
@@ -137,8 +137,8 @@ bugs/bug139.go:7: fatal error: naddr: ONAME class x 5
 BUG should compile
 
 =========== bugs/bug140.go
-bugs/bug140.go:6: syntax error near L
-bugs/bug140.go:7: syntax error near L
+bugs/bug140.go:6: syntax error near L1
+bugs/bug140.go:7: syntax error near L2
 BUG should compile
 
 =========== fixedbugs/bug016.go