summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-24 01:39:15 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-24 01:39:15 -0800
commitfd84fa03901b4b8a72a54552f302755d6c84aeba (patch)
tree59528b2434ae5a42e4b966d255b17f015273d24f /parse/specialize.c
parenta555f36aad5963dc600bc0af9433c39ced49b476 (diff)
downloadmc-fd84fa03901b4b8a72a54552f302755d6c84aeba.tar.gz
Just fully replace the type in the specialization.
Nothing is going to care, and this fixes the problem of handlign more specialization post unification.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index 1db921f..7a526bb 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -57,7 +57,7 @@ Type *tyspecialize(Type *orig, Htab *tsmap, Htab *delayed)
ret->issynth = 1;
ret->arg = arg;
ret->narg = narg;
- tytab[var->tid] = ret;
+ *var = *ret;
break;
case Tyname:
if (!hasparams(t))
@@ -69,7 +69,7 @@ Type *tyspecialize(Type *orig, Htab *tsmap, Htab *delayed)
ret = mktyname(t->loc, t->name, tyspecialize(t->sub[0], tsmap, delayed));
ret->arg = arg;
ret->narg = narg;
- tytab[var->tid] = ret;
+ *var = *ret;
break;
case Tystruct:
ret = tydup(t);