Skip to content

Commit

Permalink
fix expr and call
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Jan 3, 2024
1 parent 881bbb1 commit 35bdbb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vyper/ast/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,10 @@ def is_terminus(self):
class Expr(Stmt):
__slots__ = ("value",)

@property
def is_terminus(self):
return self.value.is_terminus


class Log(Stmt):
__slots__ = ("value",)
Expand Down Expand Up @@ -1313,10 +1317,10 @@ class Call(ExprNode):
@property
def is_terminus(self):
# cursed import cycle!
from vyper.builtins.functions import DISPATCH_TABLE
from vyper.builtins.functions import get_builtin_functions

func_name = self.func.id
builtin_t = DISPATCH_TABLE[func_name]
builtin_t = get_builtin_functions().get(func_name)
return getattr(builtin_t, "_is_terminus", False)

# try checking if this is a builtin, which is foldable
Expand Down

0 comments on commit 35bdbb4

Please sign in to comment.