From d0fa6c11b2ba13b1d88129635ee512e4f687dda1 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 1 Sep 2009 18:04:49 -0700 Subject: type switch bug involving function parameter names R=ken OCL=34232 CL=34232 --- src/cmd/gc/subr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/cmd/gc/subr.c') diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index 9eb92f0bb..0c436de0b 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -1920,8 +1920,12 @@ typehash(Type *at, int addsym, int d) break; case TSTRUCT: - for(t=at->type; t!=T; t=t->down) - h += PRIME7 * typehash(t, addsym, d+1); + for(t=at->type; t!=T; t=t->down) { + if(at->funarg) // walk into TFIELD in function argument struct + h += PRIME7 * typehash(t->type, addsym, d+1); + else + h += PRIME7 * typehash(t, addsym, d+1); + } break; case TFUNC: -- cgit v1.2.3