solidity/test/libsolidity/syntaxTests/viewPureChecker/constant_restrict_warning.sol

13 lines
342 B
Solidity
Raw Normal View History

2018-07-04 09:25:45 +00:00
contract C {
uint constant x = 2;
function f() view public returns (uint) {
return x;
}
function g() public returns (uint) {
return x;
}
}
// ----
// Warning 2018: (42-107): Function state mutability can be restricted to pure
// Warning 2018: (112-172): Function state mutability can be restricted to pure