codekingpro/portable-devtools
114k
1// errorcheck2 3// Copyright 2012 The Go Authors. All rights reserved.4// Use of this source code is governed by a BSD-style5// license that can be found in the LICENSE file.6 7// Verify that the Go compiler will not8// die after running into an undefined9// type in the argument list for a10// function.11// Does not compile.12 13package main14 15func mine(int b) int { // ERROR "undefined.*b"16 return b + 2 // ERROR "undefined.*b"17}18 19func main() {20 mine() // ERROR "not enough arguments"21 c = mine() // ERROR "undefined.*c|not enough arguments"22}23 