solidity/test/libsolidity/syntaxTests/viewPureChecker/literal_suffix_allowed.sol
Kamil Śliwak 8adf89f042 Test cases
2022-08-11 09:37:32 +02:00

17 lines
531 B
Solidity

function viewSuffix(uint) view returns (uint) {}
function mutableSuffix(uint) returns (uint) {}
contract C {
function pureFunction() pure public {
1 viewSuffix; // TODO: Should be disallowed
1 mutableSuffix; // TODO: Should be disallowed
}
// TODO: There should be no mutability restriction suggestion
function viewFunction() view public {
1 mutableSuffix; // TODO: Should be disallowed
}
}
// ----
// Warning 2018: (341-440): Function state mutability can be restricted to pure