mirror of
https://github.com/golang/go
synced 2024-11-11 23:20:24 -07:00
tweak interface warning heuristic.
some day i will fix this for real. R=ken OCL=27468 CL=27468
This commit is contained in:
parent
4b8c13dc20
commit
935953a9f8
@ -2885,7 +2885,8 @@ ifaceokT2I(Type *t0, Type *iface, Type **m)
|
||||
// supposed to do something better eventually
|
||||
// but this will catch errors while we decide the
|
||||
// details of the "better" solution.
|
||||
if(t == t0 && t->methptr == 2) {
|
||||
// only warn if iface is not interface{}.
|
||||
if(t == t0 && t->methptr == 2 && iface->type != T) {
|
||||
yyerror("probably wanted *%T not %T", t, t);
|
||||
*m = iface->type;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user