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