Akshat Kumar | 51e8fe5 | 2012-10-07 14:11:59 +0800 | [diff] [blame] | 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() { |
Ian Lance Taylor | 161a45a | 2013-12-12 17:18:12 -0800 | [diff] [blame] | 16 | mine() // GCCGO_ERROR "not enough arguments" |
Daniel Morsing | f2e94b5 | 2014-01-03 21:03:20 +0100 | [diff] [blame] | 17 | c = mine() // ERROR "undefined.*c|not enough arguments" |
Akshat Kumar | 51e8fe5 | 2012-10-07 14:11:59 +0800 | [diff] [blame] | 18 | } |