You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes.
What did you do?
I tried to go build the following file:
package a
func f() (int, int, named int) {
return 0, 0, 0
}
What did you expect to see?
Something like
./a.go:3:27: mixed named and unnamed return values
What did you see instead?
./a.go:3:27: duplicate argument int
The text was updated successfully, but these errors were encountered:
ghost
changed the title
cmd/go: misleading warning with mixed named and unnamed return values
cmd/go: misleading error message with mixed named and unnamed return values
Jul 20, 2018
The error message is correct. You're declaring three named integer return values, with the names int, int, and named respectively. https://play.golang.org/p/I6m0NMX5f_M
What version of Go are you using (
go version
)?go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What did you do?
I tried to
go build
the following file:What did you expect to see?
Something like
What did you see instead?
The text was updated successfully, but these errors were encountered: