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/fallback/pure_modifier.sol | 6 ++++++ test/libsolidity/syntaxTests/fallback/view_modifier.sol | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 test/libsolidity/syntaxTests/fallback/pure_modifier.sol create mode 100644 test/libsolidity/syntaxTests/fallback/view_modifier.sol (limited to 'test/libsolidity/syntaxTests/fallback') diff --git a/test/libsolidity/syntaxTests/fallback/pure_modifier.sol b/test/libsolidity/syntaxTests/fallback/pure_modifier.sol new file mode 100644 index 00000000..20d5b0ac --- /dev/null +++ b/test/libsolidity/syntaxTests/fallback/pure_modifier.sol @@ -0,0 +1,6 @@ +contract C { + uint x; + function() pure { x = 2; } +} +// ---- +// TypeError: (29-55): Fallback function must be payable or non-payable, but is "pure". diff --git a/test/libsolidity/syntaxTests/fallback/view_modifier.sol b/test/libsolidity/syntaxTests/fallback/view_modifier.sol new file mode 100644 index 00000000..44c5d204 --- /dev/null +++ b/test/libsolidity/syntaxTests/fallback/view_modifier.sol @@ -0,0 +1,6 @@ +contract C { + uint x; + function() view { x = 2; } +} +// ---- +// TypeError: (29-55): Fallback function must be payable or non-payable, but is "view". -- cgit v1.2.3