diff --git a/tests/parser/features/decorators/test_pure.py b/tests/parser/features/decorators/test_pure.py index efecbba3d3..d193c8838f 100644 --- a/tests/parser/features/decorators/test_pure.py +++ b/tests/parser/features/decorators/test_pure.py @@ -143,3 +143,21 @@ def foo(x: uint256)-> bytes32: ), StateAccessViolation, ) + + +def test_invalid_interface(get_contract, assert_compile_failed): + assert_compile_failed( + lambda: get_contract( + """ +interface Foo: + def foo() -> uint256: payable + + +@external +@pure +def bar(a: address) -> uint256: + return Foo(a).foo() + """ + ), + StateAccessViolation, + ) \ No newline at end of file