Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Feb 21, 2024
1 parent f6c95b2 commit 19baa5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion vyper/builtins/_signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from vyper.codegen.expr import Expr
from vyper.codegen.ir_node import IRnode
from vyper.exceptions import CompilerPanic, TypeMismatch, UnfoldableNode
from vyper.semantics.analysis.base import Modifiability
from vyper.semantics.analysis.base import Modifiability, StateMutability
from vyper.semantics.analysis.utils import (
check_modifiability,
get_exact_type_from_node,
Expand Down Expand Up @@ -87,6 +87,7 @@ class BuiltinFunctionT(VyperType):
_return_type: Optional[VyperType] = None
_equality_attrs = ("_id",)
_is_terminus = False
mutability: StateMutability = StateMutability.PURE

@property
def modifiability(self):
Expand Down
4 changes: 2 additions & 2 deletions vyper/semantics/analysis/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ def visit_Call(self, node: vy_ast.Call, typ: VyperType) -> None:
for arg, arg_type in zip(node.args, func_type.arg_types):
self.visit(arg, arg_type)
else:
# builtin functions
if self.function_analyzer:
# builtin functions and interfaces
if self.function_analyzer and hasattr(func_type, "mutability"):
self._check_call_mutability(func_type.mutability) # type: ignore

arg_types = func_type.infer_arg_types(node, expected_return_typ=typ) # type: ignore
Expand Down

0 comments on commit 19baa5d

Please sign in to comment.