diff options
author | Ken Thompson <ken@golang.org> | 2009-03-11 16:25:45 -0700 |
---|---|---|
committer | Ken Thompson <ken@golang.org> | 2009-03-11 16:25:45 -0700 |
commit | 196758e3ba136c195940a13a034014a8ea666348 (patch) | |
tree | cc15a056328a55e040e1b2dc34a43228ae5e2d47 /test/fixedbugs/bug137.go | |
parent | 532bb647046fe186d60ba3f891baab101e5a7e10 (diff) | |
download | golang-196758e3ba136c195940a13a034014a8ea666348.tar.gz |
bug 137
R=r
OCL=26142
CL=26142
Diffstat (limited to 'test/fixedbugs/bug137.go')
-rw-r--r-- | test/fixedbugs/bug137.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/fixedbugs/bug137.go b/test/fixedbugs/bug137.go new file mode 100644 index 000000000..152792411 --- /dev/null +++ b/test/fixedbugs/bug137.go @@ -0,0 +1,26 @@ +// $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() { +L1: +L2: for i := 0; i < 10; i++ { + print(i); + break L2; + } + +L3: ; +L4: for i := 0; i < 10; i++ { + print(i); + break L4; + } +} + +/* +bug137.go:9: break label is not defined: L2 +bug137.go:15: break label is not defined: L4 +*/ |