2012-02-16 23:49:59 -05:00
|
|
|
// errorcheck
|
2011-03-07 19:36:17 -05:00
|
|
|
|
2016-04-10 14:32:26 -07:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
2011-03-07 19:36:17 -05:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package p
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func f() (_ int, err error) {
|
2011-03-07 19:36:17 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func g() (x int, _ error) {
|
2011-03-07 19:36:17 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func h() (_ int, _ error) {
|
2011-03-07 19:36:17 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func i() (int, error) {
|
2021-11-17 15:23:12 -08:00
|
|
|
return // ERROR "not enough return values|not enough arguments to return"
|
2011-03-07 19:36:17 -05:00
|
|
|
}
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func f1() (_ int, err error) {
|
2011-03-07 19:36:17 -05:00
|
|
|
return 1, nil
|
|
|
|
}
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func g1() (x int, _ error) {
|
2011-03-07 19:36:17 -05:00
|
|
|
return 1, nil
|
|
|
|
}
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func h1() (_ int, _ error) {
|
2011-03-07 19:36:17 -05:00
|
|
|
return 1, nil
|
|
|
|
}
|
|
|
|
|
2011-11-01 22:06:05 -04:00
|
|
|
func ii() (int, error) {
|
2011-03-07 19:36:17 -05:00
|
|
|
return 1, nil
|
|
|
|
}
|