From: Russ Cox Date: Wed, 15 Apr 2009 02:57:27 +0000 (-0700) Subject: tweak interface warning heuristic. X-Git-Tag: weekly.2009-11-06~1838 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=935953a9f8c35f1282aa934bc72c78fce5af4693;p=gostls13.git tweak interface warning heuristic. some day i will fix this for real. R=ken OCL=27468 CL=27468 --- diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index cde3b58b9d..1f057744ec 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -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;