summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-30 00:16:02 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-30 00:16:02 -0800
commit29bd0da380f893e1f031c36878676a460fd18402 (patch)
tree203942fff10452532b283e48e9e72948da9f6619 /parse/specialize.c
parent2d534bb4fe76d68eb1ffb7805054d9acfef0e89e (diff)
downloadmc-29bd0da380f893e1f031c36878676a460fd18402.tar.gz
Fix recursive types. Again.
This code does 2 things: 1) It compares on TID. This shouldn't matter much. 2) It resolves the type in the substitution map. This prevents us from returning the wrong type.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index dd298ac..dce9f00 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -90,7 +90,7 @@ Type *tyspecialize(Type *orig, Tysubst *tsmap, Htab *delayed)
t = tysearch(orig);
tmp = substget(tsmap, t);
if (tmp)
- return tmp;
+ return tysearch(tmp);
arg = NULL;
narg = 0;
switch (t->type) {