diff options
| author | 2022-08-25 18:39:14 +0200 | |
|---|---|---|
| committer | 2022-08-25 18:39:14 +0200 | |
| commit | 76d1180de688192d73f52c04b99c213903557601 (patch) | |
| tree | f106facdf65f61f8f61ba7916b13d8f671173fdd /bootstrap/parse.c | |
| parent | b89330259432de90578f21b013bae78177a1221c (diff) | |
don't inherit defers into nested functions
Diffstat (limited to 'bootstrap/parse.c')
| -rw-r--r-- | bootstrap/parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c index 99d317a..fd38860 100644 --- a/bootstrap/parse.c +++ b/bootstrap/parse.c @@ -2701,6 +2701,7 @@ parsefn(struct decl *decl, struct parser *P) { lexexpect(P, '{'); env->parent = P->curenv; + WITH_TMPCHANGE(struct blockstmt *, P->curblock, NULL) // do not inherit defers WITH_TMPCHANGE(struct fn *, P->curfn, fn) { pushenv(P, env); putdecl(P, tok.span, &(struct decl) { |