mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
9 lines
251 B
Solidity
9 lines
251 B
Solidity
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".
|