aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/env.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-08 19:31:35 +0200
committerlemon <lsof@mailbox.org>2022-08-08 19:31:35 +0200
commitdddbdcbeb41777c1e98e37281dddd6f3c89a1280 (patch)
tree6c172f13a3d7d92bc31b8a045d81b7fa7caad007 /bootstrap/env.c
parentfc55daf22dd890860ac9c1a0a29900977a700df2 (diff)
ok
Diffstat (limited to 'bootstrap/env.c')
-rw-r--r--bootstrap/env.c4
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;