From 2450c590e9be32bef4d7a490343c9b082324fe60 Mon Sep 17 00:00:00 2001 From: Ken Thompson Date: Wed, 1 Apr 2009 21:28:59 -0700 Subject: [PATCH] typeswitch - expression evaluated twice instead of once. R=r OCL=27015 CL=27015 --- src/cmd/gc/swt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.48.1