You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: