solidity/test/libsolidity/semanticTests/literalSuffixes/suffixed_address.sol
2023-05-17 16:55:14 +02:00

17 lines
493 B
Solidity

function not(address a) pure suffix returns (bytes20) {
return ~bytes20(a);
}
contract C {
function notMin() public pure returns (bytes20) {
return 0x0000000000000000000000000000000000000000 not;
}
function notMax() public pure returns (bytes20) {
return 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF not;
}
}
// ----
// notMin() -> 0xffffffffffffffffffffffffffffffffffffffff000000000000000000000000
// notMax() -> 0x0000000000000000000000000000000000000000