solidity/test/libsolidity/semanticTests/viaYul/negation_bug.sol

14 lines
229 B
Solidity
Raw Normal View History

2021-07-07 18:20:06 +00:00
contract C {
function f() public pure {
-(int8(0));
unchecked {
// Used to incorrectly use the checked unary negation function and revert.
(-(type(int8).min));
}
}
}
// ====
// compileViaYul: also
// ----
// f() ->