...
Run Format

Source file test/fixedbugs/issue14136.go

Documentation: test/fixedbugs

     1  // errorcheck
     2  
     3  // Copyright 2016 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 that > 10 non-syntax errors on the same line
     8  // don't lead to early exit. Specifically, here test
     9  // that we see the initialization error for variable
    10  // s.
    11  
    12  package main
    13  
    14  type T struct{}
    15  
    16  func main() {
    17  	t := T{X: 1, X: 1, X: 1, X: 1, X: 1, X: 1, X: 1, X: 1, X: 1, X: 1} // ERROR "unknown field 'X' in struct literal of type T"
    18  	var s string = 1 // ERROR "cannot use 1"
    19  }
    20  

View as plain text