modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/typecheck.go (about) 1 // errorcheck 2 3 // Verify that the Go compiler will not 4 // die after running into an undefined 5 // type in the argument list for a 6 // function. 7 // Does not compile. 8 9 package main 10 11 func mine(int b) int { // ERROR "undefined.*b" 12 return b + 2 // ERROR "undefined.*b" 13 } 14 15 func main() { 16 mine() // GCCGO_ERROR "not enough arguments" 17 c = mine() // ERROR "undefined.*c|not enough arguments" 18 }