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

cmd/compile: misleading error for multiple value function call in contexts that do accept multiple values #15785

Open
tmielcza opened this Issue May 21, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@tmielcza

tmielcza commented May 21, 2016

playground

I can use a function's multiple returns as arguments to another function, but cannot use them as parameters in an initialization.

If it is intended, then the compiling error multiple-value ... in single-value context is misleading, because an array or struct initialization can indeed take multiple values.

@ianlancetaylor ianlancetaylor changed the title from cannot use function multiple return values as parameters in struct/array initialization to cmd/compile: misleading error for multiple value function call in contexts that do accept multiple values May 22, 2016

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented May 22, 2016

It's intended. Changed this bug to be for a better compiler error message.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone May 22, 2016

@odeke-em odeke-em self-assigned this Aug 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment