shithub: mc

Download patch

ref: 2809ae93520d9f0444f6c6f3c51db3ef65602b4b
parent: 9424339d8d453f5c559edd5d23549d662d1c9d8d
author: Ori Bernstein <[email protected]>
date: Tue Jan 2 18:19:38 EST 2018

Get closer to typechecking generic args correctly.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -638,7 +638,9 @@
 	t = tylookup(orig);
 	isgeneric = t->type == Tygeneric;
 	ingeneric += isgeneric;
+	pushenv(orig->env);
 	tyresolve(t);
+	popenv(orig->env);
 	/* If this is an instantiation of a generic type, we want the params to
 	 * match the instantiation */
 	if (orig->type == Tyunres && t->type == Tygeneric) {