]> Cypherpunks.ru repositories - gostls13.git/blob - src/go/parser/testdata/issue11377.src
1c438003eb8e069cc74027c3fbccafd9fb0ab3b9
[gostls13.git] / src / go / parser / testdata / issue11377.src
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 issue 11377: Better synchronization of
6 // parser after certain syntax errors.
7
8 package p
9
10 func bad1() {
11     if f()) /* ERROR "expected ';', found '\)'" */ {
12         return
13     }
14 }
15
16 // There shouldn't be any errors down below.
17
18 func F1() {}
19 func F2() {}
20 func F3() {}
21 func F4() {}
22 func F5() {}
23 func F6() {}
24 func F7() {}
25 func F8() {}
26 func F9() {}
27 func F10() {}