diff --git a/vyper/builtins/functions.py b/vyper/builtins/functions.py index e42521cacc..8f8713b59e 100644 --- a/vyper/builtins/functions.py +++ b/vyper/builtins/functions.py @@ -111,8 +111,6 @@ class FoldedFunction(BuiltinFunction): # Since foldable builtin functions are not folded before semantics validation, # this flag is used for `check_variable_constancy` in semantics validation. _kwargable = True - # Skip annotation of builtins if it will be folded before codegen - _always_folded_before_codegen = True class TypenameFoldedFunction(FoldedFunction): @@ -2289,9 +2287,6 @@ def build_IR(self, expr, args, kwargs, context): class Empty(TypenameFoldedFunction): _id = "empty" - # Since `empty` is not folded in the AST, `is_folded` is set to False - # so that it will be properly annotated. - _always_folded_before_codegen = False def fetch_call_return(self, node): type_ = self.infer_arg_types(node)[0].typedef diff --git a/vyper/semantics/analysis/local.py b/vyper/semantics/analysis/local.py index c3c4bc4fce..342d1aa243 100644 --- a/vyper/semantics/analysis/local.py +++ b/vyper/semantics/analysis/local.py @@ -684,9 +684,6 @@ def visit_Call(self, node: vy_ast.Call, typ: VyperType) -> None: for arg, arg_type in zip(node.args, call_type.arg_types): self.visit(arg, arg_type) else: - if getattr(call_type, "_always_folded_before_codegen", False): - return - # builtin functions arg_types = call_type.infer_arg_types(node, typ) # `infer_arg_types` already calls `validate_expected_type`