summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-08-26 21:15:56 -0700
committerOri Bernstein <ori@eigenstate.org>2017-08-26 21:15:56 -0700
commitd27288db4ad5b2154c8c946029f8ed1943012286 (patch)
treefe494ef7f68c391d19c0f2b928a68ca58333e1cf /mi
parent8317e87e7b6f9a15ff41f9f7293ef46dc208d0d7 (diff)
downloadmc-d27288db4ad5b2154c8c946029f8ed1943012286.tar.gz
Let's get happy little rvalues.
Diffstat (limited to 'mi')
-rw-r--r--mi/flatten.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mi/flatten.c b/mi/flatten.c
index 228f21b..9ef2c70 100644
--- a/mi/flatten.c
+++ b/mi/flatten.c
@@ -887,7 +887,7 @@ flattentraititer(Flattenctx *s, Node *n)
Loop l;
Node *lbody, *lclean, *lstep, *lmatch, *lend;
Node *done, *val, *iter, *valptr, *iterptr;
- Node *func, *call;
+ Node *func, *call, *seq;
Trait *tr;
val = temp(s, n->iterstmt.elt);
@@ -911,7 +911,8 @@ flattentraititer(Flattenctx *s, Node *n)
s->loop.lbrk = lend;
s->loop.body = n->iterstmt.body->block.scope;
- append(s, asn(iter, n->iterstmt.seq));
+ seq = rval(s, n->iterstmt.seq);
+ append(s, asn(iter, seq));
jmp(s, lstep);
flatten(s, lbody);
/* body */