Source file test/fixedbugs/issue22164.go

     1  // errorcheck
     2  
     3  // Copyright 2017 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.
     6  
     7  // Test error recovery after missing closing parentheses in lists.
     8  
     9  package p
    10  
    11  func f() {
    12  	x := f(g() // ERROR "unexpected newline"
    13  	y := 1
    14  }
    15  
    16  func g() {
    17  }
    18  
    19  func h() {
    20  	x := f(g() // ERROR "unexpected newline"
    21  }
    22  
    23  func i() {
    24  	x := []int{1, 2, 3 // ERROR "unexpected newline"
    25  	y := 0
    26  }

View as plain text