diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-04 17:25:45 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-04 17:25:45 +0800 |
commit | f5be38bff10b02ab5b7bc1125daa6fbe17f87b65 (patch) | |
tree | 8ba9eef13c0d4331155021b1d3f477520f5af6c2 /test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol | |
parent | d9a8f2aaceb077d5a3ef0bb2971d747b894aee7f (diff) | |
download | dexon-solidity-f5be38bff10b02ab5b7bc1125daa6fbe17f87b65.tar dexon-solidity-f5be38bff10b02ab5b7bc1125daa6fbe17f87b65.tar.gz dexon-solidity-f5be38bff10b02ab5b7bc1125daa6fbe17f87b65.tar.bz2 dexon-solidity-f5be38bff10b02ab5b7bc1125daa6fbe17f87b65.tar.lz dexon-solidity-f5be38bff10b02ab5b7bc1125daa6fbe17f87b65.tar.xz dexon-solidity-f5be38bff10b02ab5b7bc1125daa6fbe17f87b65.tar.zst dexon-solidity-f5be38bff10b02ab5b7bc1125daa6fbe17f87b65.zip |
Extend view pure test suite.
Diffstat (limited to 'test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol b/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol new file mode 100644 index 00000000..a4b4a353 --- /dev/null +++ b/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol @@ -0,0 +1,12 @@ +contract C { + uint constant x = 2; + function f() view public returns (uint) { + return x; + } + function g() public returns (uint) { + return x; + } +} +// ---- +// Warning: (42-107): Function state mutability can be restricted to pure +// Warning: (112-172): Function state mutability can be restricted to pure |