diff options
author | Russ Cox <rsc@golang.org> | 2008-12-20 16:30:44 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2008-12-20 16:30:44 -0800 |
commit | 6839b005ff8621ce201d7033e56bf829997a4be0 (patch) | |
tree | b43bfb49764e70eb4a1d3f60a7f3352c71893e5c /src | |
parent | f2a2799110c7496978b060837e1f7165e60e4b8a (diff) | |
download | golang-6839b005ff8621ce201d7033e56bf829997a4be0.tar.gz |
fix new(T) if type T []int.
make sure type of expr is T not just []int
R=ken
OCL=21688
CL=21688
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/gc/walk.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index f24933483..58d24bca0 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: |