shithub: mc

Download patch

ref: 47188c33df351d338a569e99006bd5761bddc715
parent: 5162ad233581d7fc5097501f6163321741174890
author: Ori Bernstein <[email protected]>
date: Wed Oct 2 14:30:10 EDT 2013

Set the type on the equality checks in match stmts

--- a/6/simp.c
+++ b/6/simp.c
@@ -507,6 +507,7 @@
         case Tyuint8: case Tyuint16: case Tyuint32: case Tyuint:
         case Typtr: case Tyfunc:
             v = mkexpr(pat->line, Oeq, pat, val, NULL);
+            v->expr.type = mktype(pat->line, Tybool);
             cjmp(s, v, iftrue, iffalse);
             break;
         case Tyunion: