Skip to content

Commit 6bc23b5

Browse files
committed
[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.
1 parent 109e208 commit 6bc23b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/CSOptimizer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ static bool isSupportedDisjunction(Constraint *disjunction) {
125125
// Non-operator disjunctions are supported only if they don't
126126
// have any generic choices.
127127
return llvm::all_of(choices, [&](Constraint *choice) {
128+
if (choice->isDisabled())
129+
return true;
130+
128131
if (choice->getKind() != ConstraintKind::BindOverload)
129132
return false;
130133

0 commit comments

Comments
 (0)