aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/env.c')
-rw-r--r--bootstrap/env.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bootstrap/env.c b/bootstrap/env.c
index 40392b9..21d9580 100644
--- a/bootstrap/env.c
+++ b/bootstrap/env.c
@@ -42,6 +42,10 @@ envput(struct env *env, const struct decl *decl) {
return d0;
if (d0->t == Dmacro && !memcmp(&decl->macro, &d0->macro, sizeof decl->macro))
return d0;
+ if (d0->t == Dtype && d0->ty == decl->ty)
+ return d0;
+ if (d0->t == Dfn && !memcmp(&decl->fn, &d0->fn, sizeof decl->fn))
+ return d0;
if (d0->t == Dtepl && !memcmp(&decl->tepl, &d0->tepl, sizeof decl->tepl))
return d0;
for (int kind = TYstruct; kind <= TYeunion; ++kind) {