Skip to content

Commit

Permalink
Fix bug with nested for_range_opt.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Jul 15, 2024
1 parent 77aaaab commit 48fbbd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ def loop_fn():
result = loop_body(arg)
if isinstance(result, MemValue):
result = result.read()
arg.update(result)
arg.link(type(arg)(result))
return condition(result)
if not isinstance(pre_condition, (bool,int)) or pre_condition:
if_statement(pre_condition, lambda: do_while(loop_fn, g=g))
Expand Down

0 comments on commit 48fbbd0

Please sign in to comment.