mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
14 lines
229 B
Solidity
14 lines
229 B
Solidity
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() ->
|