summaryrefslogtreecommitdiff
path: root/parse/use.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-07-12 14:23:47 -0700
committerOri Bernstein <ori@eigenstate.org>2016-07-12 14:23:47 -0700
commitddc0ccdd899d29f60b53c069cf4be4d63156ec92 (patch)
treebf26b0efa158ffe985d1897c993b4680cf2e241f /parse/use.c
parentbc82e05805d51c1f58cd2e0f9b3ba098522b8ad9 (diff)
downloadmc-ddc0ccdd899d29f60b53c069cf4be4d63156ec92.tar.gz
Revert "don't completely fuck up trait exports."
This reverts commit bc82e05805d51c1f58cd2e0f9b3ba098522b8ad9.
Diffstat (limited to 'parse/use.c')
-rw-r--r--parse/use.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/parse/use.c b/parse/use.c
index b028daf..59421b1 100644
--- a/parse/use.c
+++ b/parse/use.c
@@ -400,7 +400,6 @@ static Type *tyunpickle(FILE *fd)
Trait *traitunpickle(FILE *fd)
{
Trait *tr;
- Node *fn;
size_t i, n;
intptr_t uid;
@@ -424,11 +423,8 @@ Trait *traitunpickle(FILE *fd)
for (i = 0; i < n; i++)
lappend(&tr->memb, &tr->nmemb, rdsym(fd, tr));
n = rdint(fd);
- for (i = 0; i < n; i++) {
- fn = rdsym(fd, tr);
- fn->decl.impls = mkht(tyhash, tyeq);
- lappend(&tr->funcs, &tr->nfuncs, fn);
- }
+ for (i = 0; i < n; i++)
+ lappend(&tr->funcs, &tr->nfuncs, rdsym(fd, tr));
htput(trmap, itop(uid), tr);
return tr;
}
@@ -967,6 +963,7 @@ foundextlib:
puttrait(s, tr->name, tr);
for (i = 0; i < tr->nfuncs; i++) {
putdcl(s, tr->funcs[i]);
+ tr->funcs[i]->decl.impls = mkht(tyhash, tyeq);
}
}
break;