summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-01 23:53:20 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-01 23:53:20 -0800
commit0205329e24d0e078a8150020843586cbd12613c8 (patch)
treee7cf29fa61da3be3dee5658a2568a55eecea48c3 /parse/specialize.c
parent1a1892e5a47ac3c1ab1b1944ee1ee11fc3d1e3c8 (diff)
downloadmc-0205329e24d0e078a8150020843586cbd12613c8.tar.gz
Copy traits over for Tyname when specializing.
We were missing trait copying, which was causing some cases for generic trait implementations to fail.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index d8777f8..3ef1164 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -125,6 +125,7 @@ Type *tyspecialize(Type *orig, Tysubst *tsmap, Htab *delayed)
for (i = 0; i < t->narg; i++)
lappend(&arg, &narg, tyspecialize(t->arg[i], tsmap, delayed));
ret = mktyname(t->loc, t->name, tyspecialize(t->sub[0], tsmap, delayed));
+ ret->traits = bsdup(t->traits);
ret->arg = arg;
ret->narg = narg;
tytab[var->tid] = ret;