Skip to content

Commit c3ca9a7

Browse files
authored
Merge pull request swiftlang#21247 from rudkx/enable-solver-operator-designated-types
[ConstraintSystem] Attempt global operators earlier.
2 parents adba382 + 119864a commit c3ca9a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,6 +1857,9 @@ void ConstraintSystem::partitionDisjunction(
18571857

18581858
partitionForDesignatedTypes(Choices, forEachChoice, appendPartition);
18591859

1860+
// Add all the things defined at global scope.
1861+
appendPartition(globalScope);
1862+
18601863
SmallVector<unsigned, 4> everythingElse;
18611864
// Gather the remaining options.
18621865
forEachChoice(Choices, [&](unsigned index, Constraint *constraint) -> bool {
@@ -1866,7 +1869,6 @@ void ConstraintSystem::partitionDisjunction(
18661869
appendPartition(everythingElse);
18671870

18681871
// Now create the remaining partitions from what we previously collected.
1869-
appendPartition(globalScope);
18701872
appendPartition(unavailable);
18711873
appendPartition(disabled);
18721874

0 commit comments

Comments
 (0)