Skip to content

Commit

Permalink
revert merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Feb 21, 2024
1 parent 9410901 commit f6c95b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vyper/builtins/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
UnfoldableNode,
ZeroDivisionException,
)
from vyper.semantics.analysis.base import Modifiability, VarInfo
from vyper.semantics.analysis.base import Modifiability, StateMutability, VarInfo
from vyper.semantics.analysis.utils import (
get_common_types,
get_exact_type_from_node,
Expand Down Expand Up @@ -1247,7 +1247,7 @@ class BlockHash(BuiltinFunctionT):
_id = "blockhash"
_inputs = [("block_num", UINT256_T)]
_return_type = BYTES32_T
_modifiability = Modifiability.RUNTIME_CONSTANT
mutability = StateMutability.VIEW

@process_inputs
def build_IR(self, expr, args, kwargs, contact):
Expand Down
3 changes: 3 additions & 0 deletions vyper/semantics/analysis/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,9 @@ def visit_Call(self, node: vy_ast.Call, typ: VyperType) -> None:
self.visit(arg, arg_type)
else:
# builtin functions
if self.function_analyzer:
self._check_call_mutability(func_type.mutability) # type: ignore

arg_types = func_type.infer_arg_types(node, expected_return_typ=typ) # type: ignore
for arg, arg_type in zip(node.args, arg_types):
self.visit(arg, arg_type)
Expand Down

0 comments on commit f6c95b2

Please sign in to comment.