Skip to content

Commit

Permalink
fix return out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Feb 23, 2022
1 parent 9abf013 commit 86220cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vyper/codegen/return_.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def finalize(fill_return_buffer):
fill_return_buffer, annotation=f"fill return buffer {sig._lll_identifier}"
)
cleanup_loops = "cleanup_repeat" if context.forvars else "pass"
# NOTE: because stack analysis is incomplete, cleanup_repeat must
# come after fill_return_buffer otherwise the stack will break
return LLLnode.from_list(
["seq", cleanup_loops, fill_return_buffer, jump_to_exit],
typ=None,
["seq", fill_return_buffer, cleanup_loops, jump_to_exit],
pos=_pos,
)

Expand Down

0 comments on commit 86220cf

Please sign in to comment.