shithub: mc

Download patch

ref: 466e33d95d9da9d218952c836d99c75ac2142b05
parent: 444b77956c15d1895a64891ca16f8313fdb00b9c
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Sep 22 20:48:25 EDT 2017

Remove obsolete assert.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -895,8 +895,7 @@
 				if (tymatchrank(tm->filter[i], ty) >= 0)
 					return 1;
 			}
-			assert(ty->nsub == 1);
-			if (!ty->sub)
+			if (!ty->sub || ty->nsub != 1)
 				break;
 			ty = ty->sub[0];
 			tm = tm->sub[ty->type];
--- a/test/pkgtrait.myr
+++ b/test/pkgtrait.myr
@@ -10,4 +10,5 @@
 const main = {
 	var auto r : regex.regex#
 	r = std.try(regex.compile(".*"))
+	std.exit(42)
 }