"M requires pointer receiver" can be misinterpreted to
mean that method M should have a pointer receiver but
does not. In fact the message means "M has a pointer
receiver" (and you don't have a pointer).
Fixes #5891.
R=ken2
CC=golang-dev
https://golang.org/cl/
11313043
"\t\thave %S%hhT\n\t\twant %S%hhT", src, dst, missing->sym,
have->sym, have->type, missing->sym, missing->type);
else if(ptr)
- *why = smprint(":\n\t%T does not implement %T (%S method requires pointer receiver)",
+ *why = smprint(":\n\t%T does not implement %T (%S method has pointer receiver)",
src, dst, missing->sym);
else if(have)
*why = smprint(":\n\t%T does not implement %T (missing %S method)\n"
"\t\thave %S%hhT\n\t\twant %S%hhT", n->type, t, missing->sym,
have->sym, have->type, missing->sym, missing->type);
else if(ptr)
- yyerror("impossible type assertion:\n\t%T does not implement %T (%S method requires pointer receiver)",
+ yyerror("impossible type assertion:\n\t%T does not implement %T (%S method has pointer receiver)",
n->type, t, missing->sym);
else if(have)
yyerror("impossible type assertion:\n\t%T does not implement %T (missing %S method)\n"