diff options
Diffstat (limited to 'bootstrap/env.c')
| -rw-r--r-- | bootstrap/env.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstrap/env.c b/bootstrap/env.c index b3652fa..601b446 100644 --- a/bootstrap/env.c +++ b/bootstrap/env.c @@ -48,8 +48,7 @@ envput(struct env *env, const struct decl *decl) { } } if (d0->t == Dfn && d0->externp == decl->externp && d0->fn.selfty == decl->fn.selfty && !d0->fn.body && decl->fn.body) { - d0->fn.body = decl->fn.body; - return d0; + goto ok; } if (d0->t == Dfn && d0->externp == decl->externp && d0->fn.selfty == decl->fn.selfty && !d0->fn.body) return d0; @@ -61,6 +60,7 @@ envput(struct env *env, const struct decl *decl) { return NULL; } } +ok: decls = xcalloc(1, sizeof *decls); decls->next = env->decls; |