3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Verify that erroneous labels are caught by the compiler.
8 // This set is caught by pass 2. That's why this file is label1.go.
34 continue L2 // ERROR "invalid continue label .*L2|continue is not in a loop"
41 continue L2 // ERROR "invalid continue label .*L2"
52 continue L3 // ERROR "invalid continue label .*L3|continue is not in a loop"
60 break L4 // ERROR "invalid break label .*L4"
63 continue L4 // ERROR "invalid continue label .*L4|continue is not in a loop"
73 break L5 // ERROR "invalid break label .*L5"
76 continue L5 // ERROR "invalid continue label .*L5|continue is not in a loop"
84 break L1 // ERROR "invalid break label .*L1"
87 continue L1 // ERROR "invalid continue label .*L1"
94 continue // ERROR "continue is not in a loop"
96 continue on // ERROR "continue label not defined: on"
99 break // ERROR "break is not in a loop"
101 break dance // ERROR "break label not defined: dance"