2012-02-16 21:49:59 -07:00
|
|
|
// errorcheck
|
2011-12-14 09:34:35 -07:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
2011-12-14 09:34:35 -07:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// Issue 2451, 2452
|
|
|
|
package foo
|
|
|
|
|
2020-12-09 21:14:07 -07:00
|
|
|
func f() error { return 0 } // ERROR "cannot use 0 (.type int.)?|has no methods"
|
2011-12-14 09:34:35 -07:00
|
|
|
|
2020-12-09 21:14:07 -07:00
|
|
|
func g() error { return -1 } // ERROR "cannot use -1 (.type int.)?|has no methods"
|