solidity/test/libsolidity/syntaxTests/viewPureChecker/immutable.sol
2020-04-02 13:52:27 +02:00

9 lines
267 B
Solidity

contract B {
uint immutable x = 1;
function f() public pure returns (uint) {
return x;
}
}
// ----
// TypeError: (100-101): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".