Skip to content

Commit 5eeaaf0

Browse files
committed
[CSStep] Overload pruning should skip previously disabled choices
This should be a no-op for operators today expect that we found a case were C++ imported operator that had a label for the second argument which disabled the overload choice early and attempted to disable it again here which breaks CSTrail because pruned choices are re-enabled once disjunction checking is complete.
1 parent 716ef96 commit 5eeaaf0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/CSStep.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,9 @@ class DisjunctionStep final : public BindingStep<DisjunctionChoiceProducer> {
708708
// Disable all of the overload choices which are different from
709709
// the one which is currently picked for representative.
710710
for (auto *constraint : disjunction->getNestedConstraints()) {
711+
if (constraint->isDisabled())
712+
continue;
713+
711714
auto choice = constraint->getOverloadChoice();
712715
if (!choice.isDecl() || choice.getDecl() == representative.getDecl())
713716
continue;

0 commit comments

Comments
 (0)