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: Better error message when failing to provide a receiver for a method expression #8385

Closed
btracey opened this issue Jul 17, 2014 · 2 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@btracey
Copy link
Contributor

btracey commented Jul 17, 2014

If one calls a method of an interface type without a receiver, such as in
http://play.golang.org/p/DKtcQ8Phs9 , one gets the error message "not enough
arguments in call to Fooer.Foo". This is confusing to people new to interfaces, as
it looks like the correct number of parameters. A better error message would be
something like "method expression without receiver", or "not enough
arguments for method expression in call to Fooer.Foo". These at least key the user
to the relevant parts of the spec.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-none, suggested.

Status changed to Accepted.

@btracey btracey added accepted Suggested Issues that may be good for new contributors looking for work to do. labels Jul 17, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@gopherbot
Copy link

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

@rsc rsc changed the title cmd/gc: Better error message when failing to provide a receiver for a method expression cmd/compile: Better error message when failing to provide a receiver for a method expression Jun 8, 2015
@mikioh mikioh modified the milestones: Go1.5, Unplanned Jun 18, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

5 participants