Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix scoping issue
  • Loading branch information
advikkabra committed Jun 21, 2024
commit f59444a92038f40045f50be779fa4d3693e173b6
1 change: 1 addition & 0 deletions src/lpython/semantics/python_ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5713,6 +5713,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
}

if (for_each) {
current_scope = parent_scope;
ASR::expr_t* loop_src_var = ASRUtils::EXPR(ASR::make_Var_t(al, x.base.base.loc, current_scope->resolve_symbol(loop_src_var_name)));
tmp = ASR::make_ForEach_t(al, x.base.base.loc, target, loop_src_var, body.p, body.size());
for_each = false;
Expand Down