add doubled labels test case

Change-Id: I82d3c5c2ef73e026347e94df9a499ba714f5e971
This commit is contained in:
Mateusz Poliwczak 2024-12-24 08:17:33 +01:00
parent f1dc059794
commit 7c2b740da6

View 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
}