Skip to content

Commit

Permalink
remove "type-checking" _try_folds
Browse files Browse the repository at this point in the history
try_fold should be called on everything very early on, so there is no
need anymore
  • Loading branch information
charles-cooper committed Dec 30, 2023
1 parent 1ea47ad commit c87b156
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions vyper/builtins/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,6 @@ def fetch_call_return(self, node):
return type_

def infer_arg_types(self, node, expected_return_typ=None):
# call `_try_fold` for its typechecking side effects
self._try_fold(node)
return [self._inputs[0][1]]

def infer_kwarg_types(self, node):
Expand Down Expand Up @@ -1008,12 +1006,6 @@ def fetch_call_return(self, node):
return self._return_type

def infer_arg_types(self, node, expected_return_typ=None):
# call `_try_fold` for its typechecking side effects`
try:
self._try_fold(node)
except UnfoldableNode:
pass

self._validate_arg_types(node)
# return a concrete type instead of abstract type
value_type = get_possible_types_from_node(node.args[0]).pop()
Expand Down Expand Up @@ -2584,8 +2576,6 @@ def _try_fold(self, node):
return ret

def infer_arg_types(self, node, expected_return_typ=None):
# call `_try_fold` for its typechecking side effects
self._try_fold(node)
input_typedef = TYPE_T(type_from_annotation(node.args[0]))
return [input_typedef]

Expand Down

0 comments on commit c87b156

Please sign in to comment.