Skip to content

Commit

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

start = TealSimpleBlock([], root_expr=self)
start = TealSimpleBlock([])
options.addLoopContinueBlock(start)

return start, start
Expand Down
4 changes: 2 additions & 2 deletions pyteal/ir/tealsimpleblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
class TealSimpleBlock(TealBlock):
"""Represents a basic block of TealComponents in a graph that does not contain a branch condition."""

def __init__(self, ops: list[TealOp], root_expr: "Expr | None" = None) -> None: # type: ignore
super().__init__(ops, root_expr=root_expr)
def __init__(self, ops: list[TealOp]) -> None:
super().__init__(ops)
self.nextBlock: TealBlock | None = None
self.visited = False

Expand Down

0 comments on commit 678a045

Please sign in to comment.