shithub: mc

Download patch

ref: 6d9376e3a72f12648f465e28885f09e258694e8a
parent: 7a0b41daf3e2dcf9ec979a4920f2dc13e698f81e
author: Ori Bernstein <[email protected]>
date: Mon Jan 9 18:29:01 EST 2012

Recurse into types when fixing them up.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -401,13 +401,18 @@
 static Type *tyfin(Type *t)
 {
     static Type *tyint;
+    int i;
 
-    t = tf(t);
     if (!tyint)
         tyint = mkty(-1, Tyint);
+
+    t = tf(t);
     if (t->type == Tyvar) {
         if (hascstr(t, cstrtab[Tcint]) && cstrcheck(t, tyint))
             return tyint;
+    } else {
+        for (i = 0; i < t->nsub; i++)
+            t->sub[i] = tyfin(t->sub[i]);
     }
     return t;
 }