From: Ken Thompson Date: Thu, 2 Apr 2009 04:28:59 +0000 (-0700) Subject: typeswitch - expression evaluated X-Git-Tag: weekly.2009-11-06~1913 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2450c590e9be32bef4d7a490343c9b082324fe60;p=gostls13.git typeswitch - expression evaluated twice instead of once. R=r OCL=27015 CL=27015 --- diff --git a/src/cmd/gc/swt.c b/src/cmd/gc/swt.c index 59065b6f06..70d1a9e477 100644 --- a/src/cmd/gc/swt.c +++ b/src/cmd/gc/swt.c @@ -788,7 +788,7 @@ typeswitch(Node *sw) a = syslook("ifacethash", 1); argtype(a, sw->ntest->right->type); - a = nod(OCALL, a, sw->ntest->right); + a = nod(OCALL, a, facename); a = nod(OAS, hashname, a); cas = list(cas, a);