mirror of
https://github.com/golang/go
synced 2024-11-14 18:20:30 -07:00
bacb307b80
fixedbugs/bug487.go:17:17: error: function result count mismatch fixedbugs/bug487.go:18:16: error: function result count mismatch fixedbugs/issue6977.go:37:26: error: duplicate method ‘m’ fixedbugs/issue6977.go:38:21: error: duplicate method ‘m’ fixedbugs/issue6977.go:39:26: error: duplicate method ‘m’ fixedbugs/issue6977.go:40:21: error: duplicate method ‘m’ Change-Id: Ie3c8a4650cd8f4c239bdceac25dc188a6a50ca34 Reviewed-on: https://go-review.googlesource.com/c/go/+/275178 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
25 lines
525 B
Go
25 lines
525 B
Go
// errorcheck
|
|
|
|
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// The gccgo compiler did not reliably report mismatches between the
|
|
// number of function results and the number of expected results.
|
|
|
|
package p
|
|
|
|
func G() (int, int, int) {
|
|
return 0, 0, 0
|
|
}
|
|
|
|
func F() {
|
|
a, b := G() // ERROR "mismatch"
|
|
a, b = G() // ERROR "mismatch"
|
|
_, _ = a, b
|
|
}
|
|
|
|
func H() (int, int) {
|
|
return G() // ERROR "too many|mismatch"
|
|
}
|