]> Cypherpunks repositories - gostls13.git/commitdiff
spec and implementation disagree with respect to label declarations
authorRobert Griesemer <gri@golang.org>
Mon, 16 Mar 2009 18:21:58 +0000 (11:21 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 16 Mar 2009 18:21:58 +0000 (11:21 -0700)
R=rsc
DELTA=19  (19 added, 0 deleted, 0 changed)
OCL=26284
CL=26336

test/bugs/bug140.go [new file with mode: 0644]
test/golden.out

diff --git a/test/bugs/bug140.go b/test/bugs/bug140.go
new file mode 100644 (file)
index 0000000..614fabd
--- /dev/null
@@ -0,0 +1,18 @@
+// $G $D/$F.go || echo BUG should compile
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+       if {} else L: ;
+       if {} else L: main() ;
+}
+
+/*
+These should be legal according to the spec.
+bug140.go:6: syntax error near L
+bug140.go:7: syntax error near L
+*/
index 0d94892cf4288a8d09f5b3ec7daa9303f9bc1999..8e4786c3cc5b84b0510ca23af597f121d7b34217 100644 (file)
@@ -136,6 +136,11 @@ 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
+BUG should compile
+
 =========== fixedbugs/bug016.go
 fixedbugs/bug016.go:7: constant -3 overflows uint