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: returning value,ok-mode expression in a function with MRVs is not an error #5500

adonovan opened this issue May 17, 2013 · 1 comment


Copy link

func f() (string, bool) { return map[int]string{1:”hi”}[1] }
This should be an error according to the spec, but it actually works in go/types and
exp/ssa/interp, returning the intuitive result of (“hi”, true).

Though I quite like what we've invented, it ain't legal. :)
Copy link

Comment 1:

This issue was closed by revision golang/tools@cc52b8b.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

3 participants