From: Russ Cox Date: Tue, 11 Nov 2008 23:55:32 +0000 (-0800) Subject: don't try interface/structure conversion until X-Git-Tag: weekly.2009-11-06~2748 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b682f924d79954ddf4a89b29627aac7a22ed4238;p=gostls13.git don't try interface/structure conversion until last resort, because it assumes every call is a real use of the conversion. R=ken OCL=19026 CL=19026 --- diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index 13ad69a65a..e68833c42e 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -597,13 +597,6 @@ loop: if(isptrarray(t) && isptrdarray(l->type)) goto ret; - // interface and structure - et = isandss(n->type, l); - if(et != Inone) { - indir(n, ifaceop(n->type, l, et)); - goto ret; - } - // structure literal if(t->etype == TSTRUCT) { indir(n, structlit(n)); @@ -624,6 +617,13 @@ loop: goto ret; } + // interface and structure + et = isandss(n->type, l); + if(et != Inone) { + indir(n, ifaceop(n->type, l, et)); + goto ret; + } + if(l->type != T) yyerror("cannot convert %T to %T", l->type, t); goto ret;