shithub: mc

Download patch

ref: 66e8d816c8cdb09bb175c0145202f100c4b4284c
parent: 92b12fc6772aae7ebb9b6436dcfc393e17de01b6
author: Ori Bernstein <[email protected]>
date: Thu Oct 5 10:26:38 EDT 2017

tysearch before checking for freshen requirement.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -415,6 +415,7 @@
 {
 	size_t i;
 
+	t = tysearch(t);
 	if (bshas(visited, t->tid))
 		return 0;
 	bsput(visited, t->tid);
@@ -486,7 +487,6 @@
 
 	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 @@
 	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));