summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-22 00:42:44 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-22 00:42:44 -0800
commit404b1885e3cec9eeb8a2fa338174f38cbfd168ad (patch)
treeefa58f9046f91dc1744b3abefe15f7be30f0d989 /parse/stab.c
parentfb11c9ffe92e56016771a9001cdf09b0e2295f7d (diff)
downloadmc-404b1885e3cec9eeb8a2fa338174f38cbfd168ad.tar.gz
Make traits work across files.
This bumps ABI, and contains a hack.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse/stab.c b/parse/stab.c
index c219985..828b248 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -412,6 +412,14 @@ void puttrait(Stab *st, Node *n, Trait *c)
static int mergeimpl(Node *old, Node *new)
{
+ Vis vis;
+
+ if (old->impl.vis > new->impl.vis)
+ vis = old->impl.vis;
+ else
+ vis = new->impl.vis;
+ old->impl.vis = vis;
+ new->impl.vis = vis;
if (old->impl.isproto && !new->impl.isproto)
*old = *new;
else if (new->impl.isproto && !old->impl.isproto)