solidity/test/libsolidity/semanticTests/immutable/read_in_ctor.sol
2022-05-19 20:23:28 +02:00

16 lines
172 B
Solidity

contract A {
uint8 immutable a;
uint8 x;
constructor() {
a = 3;
x = a;
}
function readX() public view returns (uint8) {
return x;
}
}
// ----
// readX() -> 3