solidity/test/libsolidity/semanticTests/immutable/stub.sol

16 lines
238 B
Solidity
Raw Normal View History

contract C {
2020-03-12 16:32:10 +00:00
uint256 immutable x;
uint256 immutable y;
constructor() public {
x = 42;
y = 23;
}
function f() public view returns (uint256, uint256) {
return (x+x,y);
}
}
2020-04-02 18:06:52 +00:00
// ====
// compileViaYul: also
// ----
// f() -> 84, 23