3 // Copyright 2015 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 switch statements are detected by the compiler.
14 case 0; // ERROR "expecting := or = or : or comma|expected :"
18 case 0; // ERROR "expecting := or = or : or comma|expected :"
23 case 0: case 0: default:
28 case 0: f() case 0: // ERROR "unexpected case at end of statement"
33 case 0: f() default: // ERROR "unexpected default at end of statement"
37 if x: // ERROR "expected case or default or }"