cmd/go: racewalk: fix nested struct handling

Fixes #4424.
Fixes #4425.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6849093
This commit is contained in:
Dmitriy Vyukov 2012-11-26 22:11:05 +04:00
parent 7c295f3f0c
commit db8d7a292d
1 changed files with 5 additions and 0 deletions

View File

@ -430,6 +430,11 @@ callinstr(Node **np, NodeList **init, int wr, int skip)
n = treecopy(n);
f = nod(OXDOT, n, newname(t1->sym));
f->type = t1;
<<<<<<< local
if(f->type->etype == TFIELD)
f->type = f->type->type;
=======
>>>>>>> other
if(callinstr(&f, init, wr, 0)) {
typecheck(&f, Erv);
res = 1;