diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index 54645438a01..55fd025f3a3 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -962,7 +962,7 @@ loop: tempname(nvar, ptrto(n->left->type)); nnew = nod(ONEW, N, N); - nnew->type = nvar->type; + nnew->type = n->left->type; nnew = newcompat(nnew); nas = nod(OAS, nvar, nnew);