Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/types: better error message for binary ops on multi-valued operands #11896

Closed
griesemer opened this issue Jul 27, 2015 · 1 comment
Closed

go/types: better error message for binary ops on multi-valued operands #11896

griesemer opened this issue Jul 27, 2015 · 1 comment
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Jul 27, 2015

f := func() (_, _ int) { return }
_ = f() + f()

produces:

invalid operation: operator + not defined for f() (value of type (_ int, _ int))

Should provide a more context-adequate error message (tuple types are not a user-visible concept). The gc compiler reports:

multiple-value f() in single-value context
@griesemer griesemer self-assigned this Jul 27, 2015
@griesemer griesemer added this to the Go1.6 milestone Jul 27, 2015
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 17, 2015

CL https://golang.org/cl/14660 mentions this issue.

Loading

@griesemer griesemer closed this in 712bae0 Sep 18, 2015
@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants