3 // Copyright 2010 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 // 6g accepts the program below even though it is syntactically incorrect:
8 // Each statement in the list of statements for each case clause must be
9 // terminated with a semicolon. No semicolon is present for the labeled
10 // statements and because the last token is a colon ":", no semicolon is
11 // inserted automatically.
13 // Both gccgo and gofmt correctly refuse this program as is and accept it
14 // when the semicolons are present.
16 // This is a test case for issue 777 ( http://code.google.com/p/go/issues/detail?id=777 ).
23 L0: // ERROR "statement"
25 L1: // ERROR "statement"
27 // correct since no semicolon is required before a '}'