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: clearer error message involving variadic calls #41440

Closed
mdempsky opened this issue Sep 16, 2020 · 1 comment
Closed

cmd/compile: clearer error message involving variadic calls #41440

mdempsky opened this issue Sep 16, 2020 · 1 comment

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Sep 16, 2020

A user tried writing (simplified):

var args []string
exec.Command(args...)

and was confused because the error message says:

have ([]string...)
want (string, ...string)

It would probably be clearer if we instead reported:

have (...string)
want (string, ...string)

/cc @cuonglm @muhlemmer if either of you are interested in looking into this.

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 17, 2020

Change https://golang.org/cl/255241 mentions this issue: cmd/compile: make error message involving variadic calls clearer

@gopherbot gopherbot closed this in df73945 Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.