solidity/test/libsolidity/semanticTests/immutable/increment_decrement.sol
2023-07-14 15:29:32 +02:00

19 lines
261 B
Solidity

contract C {
int immutable x = 1;
int immutable y = 3;
constructor() {
x--;
--x;
y++;
++y;
--y;
}
function f() public view returns (int, int) {
return (x, y);
}
}
// ----
// f() -> -1, 4