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

16 lines
231 B
Solidity
Raw Normal View History

contract C {
2020-03-12 16:32:10 +00:00
uint256 immutable x;
uint256 immutable y;
2020-06-23 12:14:24 +00:00
constructor() {
2020-03-12 16:32:10 +00:00
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