From: Russ Cox Date: Sun, 21 Dec 2008 00:30:44 +0000 (-0800) Subject: fix new(T) if type T []int. X-Git-Tag: weekly.2009-11-06~2460 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=af5e16cfd9898e53beb1a8d74bcdf00ad9e6b8ba;p=gostls13.git fix new(T) if type T []int. make sure type of expr is T not just []int R=ken OCL=21688 CL=21688 --- 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: