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

17 lines
304 B
Solidity

function not(bool a) pure suffix returns (bool) {
return !a;
}
contract C {
function notTrue() public pure returns (bool) {
return true not;
}
function notFalse() public pure returns (bool) {
return false not;
}
}
// ----
// notTrue() -> false
// notFalse() -> true