File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2525,10 +2525,9 @@ void ConstraintSystem::generateConstraints(
2525
2525
}
2526
2526
2527
2527
for (auto index : indices (choices)) {
2528
- const auto &choice = choices[index];
2529
2528
if (favoredIndex && (*favoredIndex == index))
2530
2529
continue ;
2531
2530
2532
- recordChoice (constraints, index, choice );
2531
+ recordChoice (constraints, index, choices[index] );
2533
2532
}
2534
2533
}
Original file line number Diff line number Diff line change @@ -2474,7 +2474,7 @@ class ConstraintSystem {
2474
2474
// / \param requiresFix Determines whether choices require a fix to
2475
2475
// / be included in the result. If the fix couldn't be provided by
2476
2476
// / `getFix` for any given choice, such choice would be filtered out.
2477
- // //
2477
+ // /
2478
2478
// / \param getFix Optional callback to determine a fix for a given
2479
2479
// / choice (first argument is a position of current choice,
2480
2480
// / second - the choice in question).
@@ -3678,6 +3678,10 @@ class DisjunctionChoice {
3678
3678
3679
3679
bool isDisabled () const { return Choice->isDisabled (); }
3680
3680
3681
+ bool hasFix () const {
3682
+ return bool (Choice->getFix ());
3683
+ }
3684
+
3681
3685
bool isUnavailable () const {
3682
3686
if (auto *decl = getDecl (Choice))
3683
3687
return decl->getAttrs ().isUnavailable (decl->getASTContext ());
You can’t perform that action at this time.
0 commit comments