2012-02-17 04:49:59 +00:00
|
|
|
// errorcheck
|
2011-03-08 00:36:17 +00:00
|
|
|
|
2016-04-10 21:32:26 +00:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
2011-03-08 00:36:17 +00: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-02 02:06:05 +00:00
|
|
|
func f() (_ int, err error) {
|
2011-03-08 00:36:17 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2011-11-02 02:06:05 +00:00
|
|
|
func g() (x int, _ error) {
|
2011-03-08 00:36:17 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2011-11-02 02:06:05 +00:00
|
|
|
func h() (_ int, _ error) {
|
2011-03-08 00:36:17 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2011-11-02 02:06:05 +00:00
|
|
|
func i() (int, error) {
|
2021-11-17 23:23:12 +00:00
|
|
|
return // ERROR "not enough return values|not enough arguments to return"
|
2011-03-08 00:36:17 +00:00
|
|
|
}
|
|
|
|
|
2011-11-02 02:06:05 +00:00
|
|
|
func f1() (_ int, err error) {
|
2011-03-08 00:36:17 +00:00
|
|
|
return 1, nil
|
|
|
|
}
|
|
|
|
|
2011-11-02 02:06:05 +00:00
|
|
|
func g1() (x int, _ error) {
|
2011-03-08 00:36:17 +00:00
|
|
|
return 1, nil
|
|
|
|
}
|
|
|
|
|
2011-11-02 02:06:05 +00:00
|
|
|
func h1() (_ int, _ error) {
|
2011-03-08 00:36:17 +00:00
|
|
|
return 1, nil
|
|
|
|
}
|
|
|
|
|
2011-11-02 02:06:05 +00:00
|
|
|
func ii() (int, error) {
|
2011-03-08 00:36:17 +00:00
|
|
|
return 1, nil
|
|
|
|
}
|