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

13 lines
209 B
Solidity

contract test {
function f() public returns (bool) {
int256 x = -2**255;
unchecked { assert(-x == x); }
return true;
}
}
// ====
// compileToEwasm: also
// ----
// f() -> true