File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ bool DisjunctionStep::attemptChoice(const DisjunctionChoice &choice) {
612
612
// took for it.
613
613
if (auto *disjunctionLocator = Producer.getLocator ()) {
614
614
auto index = choice.getIndex ();
615
- CS. DisjunctionChoices . push_back ({ disjunctionLocator, index} );
615
+ recordDisjunctionChoice ( disjunctionLocator, index);
616
616
617
617
// Implicit unwraps of optionals are worse solutions than those
618
618
// not involving implicit unwraps.
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ namespace swift {
32
32
namespace constraints {
33
33
34
34
class SolverStep ;
35
+ class ComponentStep ;
35
36
36
37
// / Represents available states which every
37
38
// / given step could be in during it's lifetime.
@@ -200,6 +201,11 @@ class SolverStep {
200
201
return CS.resolvedOverloadSets ;
201
202
}
202
203
204
+ void recordDisjunctionChoice (ConstraintLocator *disjunctionLocator,
205
+ unsigned index) const {
206
+ CS.DisjunctionChoices .push_back ({disjunctionLocator, index});
207
+ }
208
+
203
209
Score getCurrentScore () const { return CS.CurrentScore ; }
204
210
205
211
Optional<Score> getBestScore () const { return CS.solverState ->BestScore ; }
Original file line number Diff line number Diff line change @@ -53,16 +53,6 @@ namespace constraints {
53
53
class ConstraintGraph ;
54
54
class ConstraintGraphNode ;
55
55
class ConstraintSystem ;
56
- class DisjunctionChoiceProducer ;
57
- class TypeBinding ;
58
- class TypeVariableBinding ;
59
- class TypeVarBindingProducer ;
60
- class StepScope ;
61
- class SolverStep ;
62
- class SplitterStep ;
63
- class ComponentStep ;
64
- class TypeVariableStep ;
65
- class DisjunctionStep ;
66
56
67
57
} // end namespace constraints
68
58
@@ -941,7 +931,6 @@ class ConstraintSystem {
941
931
friend class SplitterStep ;
942
932
friend class ComponentStep ;
943
933
friend class TypeVariableStep ;
944
- friend class DisjunctionStep ;
945
934
946
935
class SolverScope ;
947
936
You can’t perform that action at this time.
0 commit comments