mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
add doubled labels test case
Change-Id: I82d3c5c2ef73e026347e94df9a499ba714f5e971
This commit is contained in:
parent
f1dc059794
commit
7c2b740da6
1 changed files with 26 additions and 0 deletions
26
src/internal/types/testdata/check/doubled_labels.go
vendored
Normal file
26
src/internal/types/testdata/check/doubled_labels.go
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// Copyright 2014 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 p
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
outer:
|
||||||
|
inner:
|
||||||
|
for {
|
||||||
|
continue inner
|
||||||
|
break inner
|
||||||
|
}
|
||||||
|
goto outer
|
||||||
|
}
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
outer:
|
||||||
|
inner:
|
||||||
|
for {
|
||||||
|
continue inner
|
||||||
|
continue outer /* ERROR "invalid continue label outer" */
|
||||||
|
break outer /* ERROR "invalid break label outer" */
|
||||||
|
}
|
||||||
|
goto outer
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue