]> Cypherpunks repositories - gostls13.git/commitdiff
fix new(T) if type T []int.
authorRuss Cox <rsc@golang.org>
Sun, 21 Dec 2008 00:30:44 +0000 (16:30 -0800)
committerRuss Cox <rsc@golang.org>
Sun, 21 Dec 2008 00:30:44 +0000 (16:30 -0800)
make sure type of expr is T not just []int

R=ken
OCL=21688
CL=21688

src/cmd/gc/walk.c

index f2493348349445b8fa29eb739ef00c9e61d2606c..58d24bca0bc95058703269706cf26ad877ecb7c4 100644 (file)
@@ -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: