| // Copyright 2011 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. |
| // Verify that erroneous labels are caught by the compiler. |
| // This set is caught by pass 2. That's why this file is label1.go. |
| continue L2 // ERROR "invalid continue label .*L2|continue is not in a loop" |
| continue L2 // ERROR "invalid continue label .*L2" |
| continue L3 // ERROR "invalid continue label .*L3|continue is not in a loop" |
| break L4 // ERROR "invalid break label .*L4" |
| continue L4 // ERROR "invalid continue label .*L4|continue is not in a loop" |
| break L5 // ERROR "invalid break label .*L5" |
| continue L5 // ERROR "invalid continue label .*L5|continue is not in a loop" |
| break L1 // ERROR "invalid break label .*L1" |
| continue L1 // ERROR "invalid continue label .*L1" |
| continue // ERROR "continue is not in a loop" |
| continue on // ERROR "continue label not defined: on" |
| break // ERROR "break is not in a loop" |
| break dance // ERROR "break label not defined: dance" |