solidity/test/libsolidity/syntaxTests/viewPureChecker/write_storage_fail.sol
2018-06-06 15:41:41 +01:00

7 lines
232 B
Solidity

contract C {
uint x;
function f() view public { x = 2; }
}
// ----
// Warning: (56-57): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.