shithub: mc

Download patch

ref: 6df14ce6f74fb0daf3bbe21516c3ee26424f885f
parent: 9bc2ee0b819f161e76600687b59f82c002e994dd
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Dec 15 20:29:48 EST 2015

Fix unit tests.

	There's still some tweaking to do on traits, but at least
	they're not broken.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1991,11 +1991,11 @@
 	Type *ty;
 
 	dcl = decls[n->expr.did];
-	if (n->expr.param) {
+	ty = NULL;
+	if (n->expr.param)
 		ty = htget(dcl->decl.impls, tf(st, n->expr.param));
-	} else {
+	if (!ty)
 		ty = tyfreshen(st, NULL, type(st, dcl));
-	}
 	unify(st, n, type(st, n), ty);
 }