solidity/test/libsolidity/semanticTests/various/flipping_sign_tests.sol
2020-10-19 16:58:59 +02:00

11 lines
177 B
Solidity

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