blob: 6f1204289a984a9e97a94a78ffe0050685c58013 [file] [log] [blame]
Akshat Kumar51e8fe52012-10-07 14:11:59 +08001// 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
9package main
10
11func mine(int b) int { // ERROR "undefined.*b"
12 return b + 2 // ERROR "undefined.*b"
13}
14
15func main() {
Ian Lance Taylor161a45a2013-12-12 17:18:12 -080016 mine() // GCCGO_ERROR "not enough arguments"
Daniel Morsingf2e94b52014-01-03 21:03:20 +010017 c = mine() // ERROR "undefined.*c|not enough arguments"
Akshat Kumar51e8fe52012-10-07 14:11:59 +080018}