From bc47265b3f6d5c15b5c57c3edc927448a8599096 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 8 May 2018 13:08:52 +0200 Subject: Replace constant with view in the tests. --- test/libsolidity/syntaxTests/inheritance/override/add_view.sol | 4 ++++ test/libsolidity/syntaxTests/inheritance/override/remove_view.sol | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 test/libsolidity/syntaxTests/inheritance/override/add_view.sol create mode 100644 test/libsolidity/syntaxTests/inheritance/override/remove_view.sol (limited to 'test/libsolidity/syntaxTests/inheritance/override') diff --git a/test/libsolidity/syntaxTests/inheritance/override/add_view.sol b/test/libsolidity/syntaxTests/inheritance/override/add_view.sol new file mode 100644 index 00000000..9973b23e --- /dev/null +++ b/test/libsolidity/syntaxTests/inheritance/override/add_view.sol @@ -0,0 +1,4 @@ +contract B { function f() public {} } +contract C is B { function f() view {} } +// ---- +// TypeError: (56-76): Overriding function changes state mutability from "nonpayable" to "view". diff --git a/test/libsolidity/syntaxTests/inheritance/override/remove_view.sol b/test/libsolidity/syntaxTests/inheritance/override/remove_view.sol new file mode 100644 index 00000000..e58f6b20 --- /dev/null +++ b/test/libsolidity/syntaxTests/inheritance/override/remove_view.sol @@ -0,0 +1,4 @@ +contract B { function f() view {} } +contract C is B { function f() public {} } +// ---- +// TypeError: (54-76): Overriding function changes state mutability from "view" to "nonpayable". -- cgit