mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CSOptimizer] Don't consider disabled overloads when checking whether disjunction is supported
Non-operator disjunctions are supported only if all of their _active_ choices are concrete.
This commit is contained in:
@@ -125,6 +125,9 @@ static bool isSupportedDisjunction(Constraint *disjunction) {
|
||||
// Non-operator disjunctions are supported only if they don't
|
||||
// have any generic choices.
|
||||
return llvm::all_of(choices, [&](Constraint *choice) {
|
||||
if (choice->isDisabled())
|
||||
return true;
|
||||
|
||||
if (choice->getKind() != ConstraintKind::BindOverload)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user