Skip to content

Commit

Permalink
use maybe for side efx in prefold
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Dec 24, 2023
1 parent 1d3de4b commit 1d8b5be
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions vyper/semantics/analysis/pre_typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,5 @@ def prefold(node: vy_ast.VyperNode, constants: dict[str, vy_ast.VyperNode]):
pass

if getattr(node, "_is_prefoldable", None):
try:
# call `get_folded_value`` for its side effects
node.get_folded_value_throwing()
except UnfoldableNode:
pass
# call `get_folded_value_maybe` for its side effects
node.get_folded_value_maybe()

0 comments on commit 1d8b5be

Please sign in to comment.