solidity/test/libsolidity/semanticTests/various/flipping_sign_tests.sol

11 lines
177 B
Solidity
Raw Normal View History

contract test {
function f() public returns (bool) {
int256 x = -2**255;
2020-09-15 14:16:30 +00:00
unchecked { assert(-x == x); }
return true;
}
}
// ----
// f() -> true