summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-06-21 22:33:00 -0700
committerOri Bernstein <ori@eigenstate.org>2016-06-21 22:33:00 -0700
commitf4c04dca98997d3161158b0f3aa755e53cc07c81 (patch)
tree3f2317b00ec16ceb14eae38ec54d1ef979570d82 /parse/stab.c
parentd3ab6d19ae584c5b10d8d7391811f3f26880aa50 (diff)
downloadmc-f4c04dca98997d3161158b0f3aa755e53cc07c81.tar.gz
Don't accidentally duck type unions.
std.option is not the same as any union with `Some x; `None.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse/stab.c b/parse/stab.c
index 8d5aeca..e3fce6e 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -406,6 +406,7 @@ void putucon(Stab *st, Ucon *uc)
if (old)
lfatal(old->loc, "`%s already defined on %s:%d", namestr(uc->name), fname(uc->loc),
lnum(uc->loc));
+ setns(uc->name, st->name);
htput(st->uc, uc->name, uc);
}
@@ -533,4 +534,9 @@ void updatens(Stab *st, char *name)
setns(td->type->name, name);
}
free(k);
+
+ k = htkeys(st->uc, &nk);
+ for (i = 0; i < nk; i++)
+ setns(k[i], name);
+ free(k);
}