diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-04 19:54:32 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-06 22:41:41 +0800 |
commit | b2a3e165cb6a7a057af0427bd4802e52f562923d (patch) | |
tree | f54c95027270dd1f0865c6cc26cea97a2f1ac3a8 /test/libsolidity/syntaxTests/viewPureChecker/modifiers.sol | |
parent | 59b35fa5b21c444bce5d28b2388ef8b4f7bae929 (diff) | |
download | dexon-solidity-b2a3e165cb6a7a057af0427bd4802e52f562923d.tar.gz dexon-solidity-b2a3e165cb6a7a057af0427bd4802e52f562923d.tar.zst dexon-solidity-b2a3e165cb6a7a057af0427bd4802e52f562923d.zip |
Extract test cases from ViewPureChecker
Diffstat (limited to 'test/libsolidity/syntaxTests/viewPureChecker/modifiers.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/viewPureChecker/modifiers.sol | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/viewPureChecker/modifiers.sol b/test/libsolidity/syntaxTests/viewPureChecker/modifiers.sol new file mode 100644 index 00000000..f8f6b2cb --- /dev/null +++ b/test/libsolidity/syntaxTests/viewPureChecker/modifiers.sol @@ -0,0 +1,17 @@ +contract D { + uint x; + modifier purem(uint) { _; } + modifier viewm(uint) { uint a = x; _; a; } + modifier nonpayablem(uint) { x = 2; _; } +} +contract C is D { + function f() purem(0) pure public {} + function g() viewm(0) view public {} + function h() nonpayablem(0) public {} + function i() purem(x) view public {} + function j() viewm(x) view public {} + function k() nonpayablem(x) public {} + function l() purem(x = 2) public {} + function m() viewm(x = 2) public {} + function n() nonpayablem(x = 2) public {} +} |