solidity/test/libsolidity/syntaxTests/freeFunctions/free_mutability.sol

9 lines
337 B
Solidity
Raw Normal View History

2020-05-04 16:38:00 +00:00
function f() {
uint x = 2;
x;
}
function g(uint[] storage x) pure { x[0] = 1; }
// ----
// Warning 2018: (0-39): Function state mutability can be restricted to pure
// TypeError 8961: (76-80): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.