diff options
Diffstat (limited to 'src/cmd/gc/dcl.c')
-rw-r--r-- | src/cmd/gc/dcl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c index c9f1b1aac..2e467249b 100644 --- a/src/cmd/gc/dcl.c +++ b/src/cmd/gc/dcl.c @@ -481,8 +481,13 @@ funclit0(Type *t) n = nod(OXXX, N, N); n->outer = funclit; + n->dcl = autodcl; funclit = n; + // new declaration context + autodcl = dcl(); + autodcl->back = autodcl; + funcargs(t); } @@ -592,6 +597,7 @@ funclit1(Type *type, Node *body) n->nbody = body; compile(n); funcdepth--; + autodcl = func->dcl; // if there's no closure, we can use f directly if(func->cvars == N) |