aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/fallback
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-16 20:43:57 +0800
committerGitHub <noreply@github.com>2018-05-16 20:43:57 +0800
commite67f0147998a9e3835ed3ce8bf6a0a0c634216c5 (patch)
treeb9c0b7d41cd9f78ae3404704a888da30e767edbe /test/libsolidity/syntaxTests/fallback
parent124ca40dc525a987a88176c6e5170978e82fa290 (diff)
parent1e45d3ab2e0ca688c2ae48ab657f11496ccebc12 (diff)
downloaddexon-solidity-e67f0147998a9e3835ed3ce8bf6a0a0c634216c5.tar.gz
dexon-solidity-e67f0147998a9e3835ed3ce8bf6a0a0c634216c5.tar.zst
dexon-solidity-e67f0147998a9e3835ed3ce8bf6a0a0c634216c5.zip
Merge pull request #4148 from ethereum/develop
Merge develop into release for 0.4.24
Diffstat (limited to 'test/libsolidity/syntaxTests/fallback')
-rw-r--r--test/libsolidity/syntaxTests/fallback/pure_modifier.sol6
-rw-r--r--test/libsolidity/syntaxTests/fallback/view_modifier.sol6
2 files changed, 12 insertions, 0 deletions
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".