summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorS. Gilles <sgilles@math.umd.edu>2018-04-18 08:30:41 -0400
committerS. Gilles <sgilles@math.umd.edu>2018-04-18 08:30:41 -0400
commit9aabbe574e648e0a462b211c62da5eb5875343b7 (patch)
tree9ac90949a12806359fd4b996029757c84ef6e2a6 /parse/stab.c
parent4acd9ee51a541f94e81457b1a7fb3accbd790696 (diff)
parent3d71446ecb6569add0d9eaf2e7e4a05d99bd2625 (diff)
downloadmc-9aabbe574e648e0a462b211c62da5eb5875343b7.tar.gz
Merge remote-tracking branch 'ori/master' into HEAD
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/parse/stab.c b/parse/stab.c
index 7e1b8c0..0319d13 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -663,13 +663,17 @@ bindtype_rec(Tyenv *e, Type *t, Bitset *visited)
switch (t->type) {
case Typaram:
tt = htget(e->tab, t);
- if (tt && tt != t)
+ if (tt && tt != t) {
tytab[t->tid] = tt;
- else if (!boundtype(t))
+ for (i = 0; i < t->nspec; i++)
+ lappend(&tt->spec, &tt->nspec, t->spec[i]);
+ } else if (!boundtype(t)) {
htput(e->tab, t, t);
- for (i = 0; i < t->nspec; i++)
+ }
+ for (i = 0; i < t->nspec; i++) {
if (t->spec[i]->aux)
bindtype_rec(e, t->spec[i]->aux, visited);
+ }
break;
case Tygeneric:
for (i = 0; i < t->ngparam; i++)