summaryrefslogtreecommitdiff
path: root/parse
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-10-05 14:26:38 -0700
committerOri Bernstein <ori@markovcorp.com>2017-10-05 14:26:38 -0700
commit66e8d816c8cdb09bb175c0145202f100c4b4284c (patch)
tree97d74c835709ac3f0cc6abb0c80a3f808c7d6360 /parse
parent92b12fc6772aae7ebb9b6436dcfc393e17de01b6 (diff)
downloadmc-66e8d816c8cdb09bb175c0145202f100c4b4284c.tar.gz
tysearch before checking for freshen requirement.
Diffstat (limited to 'parse')
-rw-r--r--parse/infer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 77749de..341d5dc 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -415,6 +415,7 @@ needfreshenrec(Type *t, Bitset *visited)
{
size_t i;
+ t = tysearch(t);
if (bshas(visited, t->tid))
return 0;
bsput(visited, t->tid);
@@ -486,7 +487,6 @@ tyresolve(Type *t)
if (t->resolved)
return;
-
/* type resolution should never throw errors about non-generic
* showing up within a generic type, so we push and pop a generic
* around resolution */
@@ -1269,7 +1269,6 @@ unifycall(Node *n)
Type *ft;
ft = type(n->expr.args[0]);
-
if (ft->type == Tyvar) {
/* the first arg is the function itself, so it shouldn't be counted */
ft = mktyfunc(n->loc, &n->expr.args[1], n->expr.nargs - 1, mktyvar(n->loc));