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

9 lines
251 B
Solidity
Raw Normal View History

2018-07-04 09:25:45 +00:00
contract C {
uint x;
function f() public pure returns (uint) {
return x;
}
}
// ----
// TypeError: (86-87): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".