mirror of https://github.com/golang/go.git
fix new(T) if type T []int.
make sure type of expr is T not just []int R=ken OCL=21688 CL=21688
This commit is contained in:
parent
2b33a134a8
commit
af5e16cfd9
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue