From 4e5f416fe4d255632ba2b7db61e7c8a94cc7c3b5 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:36:23 +0800 Subject: [PATCH] add tests --- tests/functional/syntax/test_interfaces.py | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/functional/syntax/test_interfaces.py b/tests/functional/syntax/test_interfaces.py index b211253b66..15a90602fc 100644 --- a/tests/functional/syntax/test_interfaces.py +++ b/tests/functional/syntax/test_interfaces.py @@ -224,6 +224,36 @@ def foo() -> uint256: """, InterfaceViolation, ), + ( + # decorators must be strictly identical + """ +interface Self: + def protected_view_fn() -> String[100]: nonpayable + +implements: Self + +@external +@pure +def protected_view_fn() -> String[100]: + return empty(String[100]) + """, + InterfaceViolation, + ), + ( + # decorators must be strictly identical + """ +interface Self: + def protected_view_fn() -> String[100]: view + +implements: Self + +@external +@pure +def protected_view_fn() -> String[100]: + return empty(String[100]) + """, + InterfaceViolation, + ), ]