ref: fef2165a21c9ed3c7c1e15ee82e5641b3d43c58f
parent: 7232ece6a83f28173aff8be16b201151ad7d3751
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Mar 7 17:13:35 EST 2016
Fix missing null terminator. Fixes #108
--- a/mi/flatten.c
+++ b/mi/flatten.c
@@ -705,7 +705,7 @@
done->expr.type = mktype(n->loc, Tybool);
cjmp(s, done, lmatch, lend);
flatten(s, lmatch);
- val = mkexpr(n->loc, Oidx, seq, idx);
+ val = mkexpr(n->loc, Oidx, seq, idx, NULL);
val->expr.type = tybase(exprtype(seq))->sub[0];
/* pattern match */
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2013,13 +2013,14 @@
constrain(st, n, type(st, n), traittab[Tcint]);
found = 1;
}
- /* otherwise, we search aggregate types for the member, and unify
- * the expression with the member type; ie:
- *
- * x: aggrtype y : memb in aggrtype
- * ---------------------------------------
- * x.y : membtype
- */
+ /*
+ * otherwise, we search aggregate types for the member, and unify
+ * the expression with the member type; ie:
+ *
+ * x: aggrtype y : memb in aggrtype
+ * ---------------------------------------
+ * x.y : membtype
+ */
} else {
if (tybase(t)->type == Typtr)
t = tybase(tf(st, t->sub[0]));