aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/inheritance
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-05-08 19:08:52 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-05-09 21:07:47 +0800
commitbc47265b3f6d5c15b5c57c3edc927448a8599096 (patch)
tree649d1225fa558a1ee13c8c325fd510082d0e45b0 /test/libsolidity/syntaxTests/inheritance
parent5cbe3e1a50f4aed7d07b7c45f115ac97df2c885a (diff)
downloaddexon-solidity-bc47265b3f6d5c15b5c57c3edc927448a8599096.tar.gz
dexon-solidity-bc47265b3f6d5c15b5c57c3edc927448a8599096.tar.zst
dexon-solidity-bc47265b3f6d5c15b5c57c3edc927448a8599096.zip
Replace constant with view in the tests.
Diffstat (limited to 'test/libsolidity/syntaxTests/inheritance')
-rw-r--r--test/libsolidity/syntaxTests/inheritance/override/add_view.sol4
-rw-r--r--test/libsolidity/syntaxTests/inheritance/override/remove_view.sol4
2 files changed, 8 insertions, 0 deletions
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".