-
-
Notifications
You must be signed in to change notification settings - Fork 887
bug: mutability of interface functions are not checked in pure functions #3425
Copy link
Copy link
Closed
Description
Version Information
- vyper Version (output of
vyper --version): 4f9f813 - OS: linux
- Python Version (output of
python --version): 3.10.8
What's your issue about?
Mutability of interface functions are not checked in pure functions. This should fail type-checking but it fails at codegen:
interface Foo:
def foo() -> uint256: payable
@external
@pure
def bar(a: address) -> uint256:
return Foo(a).foo()
File "/home/user/vyper/vyper/codegen/external_call.py", line 234, in ir_for_external_call
_external_call_helper(contract_address, args_ir, call_kwargs, call_expr, context)
File "/home/user/vyper/vyper/codegen/external_call.py", line 208, in _external_call_helper
assert use_staticcall, "typechecker missed this"
AssertionError: typechecker missed this
How can it be fixed?
Fill this in if you know how to fix it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels