From af5e16cfd9898e53beb1a8d74bcdf00ad9e6b8ba Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 20 Dec 2008 16:30:44 -0800 Subject: [PATCH] fix new(T) if type T []int. make sure type of expr is T not just []int R=ken OCL=21688 CL=21688 --- src/cmd/gc/walk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index f249334834..58d24bca0b 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -2671,6 +2671,7 @@ arrayop(Node *n, int top) r = nod(OCALL, on, r); walktype(r, top); + r->type = t; // if t had a name, going through newarray lost it break; case OSLICE: -- 2.48.1