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

19 lines
261 B
Solidity
Raw Normal View History

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