summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse/infer.c9
-rw-r--r--parse/use.c6
2 files changed, 10 insertions, 5 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 10be7dd..f221df4 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2400,6 +2400,8 @@ void tagexports(Node *file, int hidelocal)
tr = gettrait(st, k[j]);
if (tr->vis == Visexport) {
tr->param->vis = Visexport;
+ for (i = 0; i < tr->naux; i++)
+ tr->aux[i]->vis = Visexport;
for (i = 0; i < tr->nmemb; i++) {
tr->memb[i]->decl.vis = Visexport;
nodetag(st, tr->memb[i], 0, hidelocal);
@@ -2416,8 +2418,11 @@ void tagexports(Node *file, int hidelocal)
k = htkeys(st->impl, &n);
for (i = 0; i < n; i++) {
s = getimpl(st, k[i]);
- if (s->impl.vis == Visexport)
- nodetag(st, s, 0, hidelocal);
+ if (s->impl.vis != Visexport)
+ continue;
+ nodetag(st, s, 0, hidelocal);
+ for (i = 0; i < tr->naux; i++)
+ tr->aux[i]->vis = Visexport;
}
free(k);
diff --git a/parse/use.c b/parse/use.c
index 24e8da7..949e069 100644
--- a/parse/use.c
+++ b/parse/use.c
@@ -415,9 +415,9 @@ Trait *traitunpickle(FILE *fd)
tr->ishidden = rdbool(fd);
tr->name = unpickle(fd);
tr->param = tyunpickle(fd);
- n = rdint(fd);
- tr->aux = zalloc(n * sizeof(Type*));
- for (i = 0; i < n; i++)
+ tr->naux = rdint(fd);
+ tr->aux = zalloc(tr->naux * sizeof(Type*));
+ for (i = 0; i < tr->naux; i++)
rdtype(fd, &tr->aux[i]);
n = rdint(fd);
for (i = 0; i < n; i++)