Skip to content

Commit

Permalink
don't need root_expr in Break()
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeph Grunschlag committed Mar 17, 2023
1 parent 79ca368 commit ec61f4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pyteal/ast/break_.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def __teal__(self, options: "CompileOptions"):
if not options.isInLoop():
raise TealCompileError("break is only allowed in a loop", self)

# TODO: apparently supplied root_expr has no effect
start = TealSimpleBlock([], root_expr=self)
start = TealSimpleBlock([])
options.addLoopBreakBlock(start)

return start, start
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/sourcemap_monkey_integ_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_sourcemap_annotate(
annotate_teal_concise=annotate_teal_concise,
)

CL = 49 # COMPILATION LINE right before this
CL = 50 # COMPILATION LINE right before this
CFILE = "tests/integration/sourcemap_monkey_integ_test.py" # this file
COMPILE = "router.compile(version=6, optimize=OptimizeOptions(scratch_slots=True), assemble_constants=False, with_sourcemaps=True, approval_filename=a_fname, clear_filename=c_fname, pcs_in_sourcemap=True, annotate_teal=True, annotate_teal_headers=annotate_teal_headers, annotate_teal_concise=annotate_teal_concise)"
INNERTXN = "InnerTxnBuilder.SetFields({TxnField.type_enum: TxnType.Payment, TxnField.receiver: recipient.address(), TxnField.amount: amount.get(), TxnField.fee: Int(0)})"
Expand Down

0 comments on commit ec61f4d

Please sign in to comment.