From ec61f4dd49045b9730f955d98a12f27c03a269cb Mon Sep 17 00:00:00 2001 From: Zeph Grunschlag Date: Thu, 16 Mar 2023 19:47:44 -0500 Subject: [PATCH] don't need root_expr in Break() --- pyteal/ast/break_.py | 3 +-- tests/integration/sourcemap_monkey_integ_test.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pyteal/ast/break_.py b/pyteal/ast/break_.py index 8543b3394..80b2e4590 100644 --- a/pyteal/ast/break_.py +++ b/pyteal/ast/break_.py @@ -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 diff --git a/tests/integration/sourcemap_monkey_integ_test.py b/tests/integration/sourcemap_monkey_integ_test.py index bd1f450d2..57d3d7775 100644 --- a/tests/integration/sourcemap_monkey_integ_test.py +++ b/tests/integration/sourcemap_monkey_integ_test.py @@ -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)})"