summaryrefslogtreecommitdiff
path: root/parse/export.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-09-02 17:04:28 -0700
committerOri Bernstein <ori@eigenstate.org>2017-09-02 17:04:28 -0700
commita7f23ccc3e024fd71451c285d9afec55f220d8df (patch)
treedccccc119445df5c6d7bde8e077a43c3655063f4 /parse/export.c
parent290709fdfc3fa92e84f9f2bf214c6a144f24c5ee (diff)
downloadmc-a7f23ccc3e024fd71451c285d9afec55f220d8df.tar.gz
Fix export tagging of traits.
Sometimes, traits would not get tagged for export transitively.
Diffstat (limited to 'parse/export.c')
-rw-r--r--parse/export.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/parse/export.c b/parse/export.c
index 0a777e7..ee40165 100644
--- a/parse/export.c
+++ b/parse/export.c
@@ -87,12 +87,19 @@ tagtype(Stab *st, Type *t, int ingeneric, int hidelocal)
tagtype(st, t->udecls[i]->etype, ingeneric, hidelocal);
break;
case Tyname:
+ case Tygeneric:
tagreflect(t);
for (i = 0; i < t->narg; i++)
tagtype(st, t->arg[i], ingeneric, hidelocal);
- case Tygeneric:
for (i = 0; i < t->ngparam; i++)
tagtype(st, t->gparam[i], ingeneric, hidelocal);
+ for (i = 0; i < t->narg; i++)
+ tagtype(st, t->arg[i], ingeneric, hidelocal);
+ break;
+ case Typaram:
+ if (t->trneed)
+ for (i = 0; bsiter(t->trneed, &i); i++)
+ tagtrait(st, traittab[i], ingeneric, hidelocal);
break;
default:
break;