1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Test case for go.dev/issue/34946: Better synchronization of
6 // parser for function declarations that start their
7 // body's opening { on a new line.
11 // accept Allman/BSD-style declaration but complain
12 // (implicit semicolon between signature and body)
14 { /* ERROR "unexpected semicolon or newline before {" */
20 func _(); { /* ERROR "unexpected semicolon or newline before {" */ }