...
1// Copyright 2018 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.
4
5// Test case for go.dev/issue/11377: Better synchronization of
6// parser after certain syntax errors.
7
8package p
9
10func bad1() {
11 if f()) /* ERROR "expected ';', found '\)'" */ {
12 return
13 }
14}
15
16// There shouldn't be any errors down below.
17
18func F1() {}
19func F2() {}
20func F3() {}
21func F4() {}
22func F5() {}
23func F6() {}
24func F7() {}
25func F8() {}
26func F9() {}
27func F10() {}
View as plain text