1// errorcheck 2 3// Copyright 2021 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 7package p 8 9func _() (int, error) { 10 return 1 // ERROR "not enough (arguments to return|return values)\n\thave \(number\)\n\twant \(int, error\)" 11} 12 13func _() (int, error) { 14 var x int 15 return x // ERROR "not enough (arguments to return|return values)\n\thave \(int\)\n\twant \(int, error\)" 16} 17 18func _() int { 19 return 1, 2 // ERROR "too many (arguments to return|return values)\n\thave \(number, number\)\n\twant \(int\)" 20} 21 22func _() { 23 return 1 // ERROR "too many (arguments to return|return values)\n\thave \(number\)\n\twant \(\)" 24} 25