shithub: mc

Download patch

ref: c2f958658791d170d6864525749bf437241790e1
parent: 12da19e4d0545514a36f30bd7db39f428cfa67c5
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jun 11 04:28:21 EDT 2018

Fix type env assertion.

	If a subtype has args, it should introduce an env.

--- a/parse/type.c
+++ b/parse/type.c
@@ -236,8 +236,8 @@
 		bindtype(t->env, param[i]);
 	if (!base->env)
 		base->env = t->env;
-	else
-		assert(base->env->super == t->env);
+	else 
+		assert(base->env->super == t->env || base->narg > 0);
 	return t;
 }