aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol
blob: a4b4a353608ce92d813bc2e35c3a281dea511a3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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