Skip to content

Commit

Permalink
add interface test
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed May 18, 2023
1 parent b754a1b commit eff8438
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/parser/features/decorators/test_pure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit eff8438

Please sign in to comment.