modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/issue14136.go (about) 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 }