]> Cypherpunks.ru repositories - gostls13.git/blob - test/typecheck.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / typecheck.go
1 // errorcheck
2
3 // Copyright 2012 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 // Verify that the Go compiler will not
8 // die after running into an undefined
9 // type in the argument list for a
10 // function.
11 // Does not compile.
12
13 package main
14
15 func mine(int b) int { // ERROR "undefined.*b"
16         return b + 2 // ERROR "undefined.*b"
17 }
18
19 func main() {
20         mine()     // ERROR "not enough arguments"
21         c = mine() // ERROR "undefined.*c|not enough arguments"
22 }