solidity/test/libsolidity/semanticTests/various/flipping_sign_tests.sol
2021-04-23 17:00:01 +01:00

14 lines
232 B
Solidity

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