summaryrefslogtreecommitdiff
path: root/mi/flatten.c
diff options
context:
space:
mode:
Diffstat (limited to 'mi/flatten.c')
-rw-r--r--mi/flatten.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mi/flatten.c b/mi/flatten.c
index 335baa4..d449806 100644
--- a/mi/flatten.c
+++ b/mi/flatten.c
@@ -891,7 +891,7 @@ flattentraititer(Flattenctx *s, Node *n)
Loop l;
Node *lbody, *lclean, *lstep, *lmatch, *lend;
Node *done, *val, *iter, *valptr, *iterptr;
- Node *func, *call, *dcl;
+ Node *func, *call, *dcl, *seq;
Trait *tr;
val = temp(s, n->iterstmt.elt);
@@ -915,7 +915,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 */