solidity/test/libsolidity/syntaxTests/immutable/reading_after_initialization_function.sol

16 lines
157 B
Solidity
Raw Normal View History

contract C {
uint immutable x;
constructor()
{
readX();
x = 3;
readX();
}
function readX() public view returns(uint) {
return x;
}
}
// ----