mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Simplify conditional expression: (A && !B) || (!A && B) is equivalent to bool(A) != bool(B)
This commit is contained in:
@@ -5645,8 +5645,7 @@ bool ConstraintSystem::repairFailures(
|
||||
|
||||
auto *parentLoc = getConstraintLocator(anchor, path);
|
||||
|
||||
if ((lhs->is<InOutType>() && !rhs->is<InOutType>()) ||
|
||||
(!lhs->is<InOutType>() && rhs->is<InOutType>())) {
|
||||
if (lhs->is<InOutType>() != rhs->is<InOutType>()) {
|
||||
// Since `FunctionArgument` as a last locator element represents
|
||||
// a single parameter of the function type involved in a conversion
|
||||
// to another function type, see `matchFunctionTypes`. If there is already
|
||||
|
||||
Reference in New Issue
Block a user