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

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
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@tmielcza
Copy link

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 cannot use function multiple return values as parameters in struct/array initialization cmd/compile: misleading error for multiple value function call in contexts that do accept multiple values May 22, 2016
@ianlancetaylor
Copy link
Contributor

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
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

4 participants