summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-03-02 23:20:26 -0800
committerOri Bernstein <ori@eigenstate.org>2016-03-02 23:22:17 -0800
commit76c34b542f0b5c0cd6cc60a9cef9d53b6fc899d1 (patch)
tree65dca14c7d64bcd25668a49fb88ca28593a3e383 /parse/stab.c
parentb369801b6f39ddd1aed3c13e2dcb23c61fc57ae7 (diff)
downloadmc-76c34b542f0b5c0cd6cc60a9cef9d53b6fc899d1.tar.gz
Allow importing multiple instances of a trait.
Hidden imports ftw.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/stab.c b/parse/stab.c
index 545d361..c18f1d5 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -413,8 +413,8 @@ static int mergetrait(Trait *old, Trait *new)
*old = *new;
else if (new->isproto && !old->isproto)
*new = *old;
- else
- return 0;
+ else if (!new->isimport && !old->isimport)
+ return new->vis == Vishidden || old->vis == Vishidden;
return 1;
}