summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-07-12 23:20:51 -0700
committerOri Bernstein <ori@eigenstate.org>2015-07-12 23:20:51 -0700
commitee4f263f0c410a8e1061ff704054f8707cb0cb0c (patch)
tree92dd2b02b31e0958a6effc7b385759e908b6eb01 /parse/specialize.c
parent12df9f45f4f383a6bdf8939b44a3b499edee853e (diff)
downloadmc-ee4f263f0c410a8e1061ff704054f8707cb0cb0c.tar.gz
Loop patterns are patterns.
As a result, we need to push the scope where the variable is declared. Let's do that.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index 4145d6d..5755406 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -195,7 +195,9 @@ static void fixup(Node *n)
fixup(n->loopstmt.body);
break;
case Niterstmt:
+ pushstab(n->iterstmt.body->block.scope);
fixup(n->iterstmt.elt);
+ popstab();
fixup(n->iterstmt.seq);
fixup(n->iterstmt.body);
break;