Skip to content

Commit 9a93a8a

Browse files
committed
Sema: Fix latent bug in CSRanking.cpp
I believe openedType1 should be computed using innerDC1 not innerDC2.
1 parent 06b4953 commit 9a93a8a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Sema/CSRanking.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,8 @@ bool CompareDeclSpecializationRequest::evaluate(
600600
// Get the type of a reference to the second declaration.
601601

602602
SmallVector<OpenedType, 4> unused, replacements;
603-
auto openedType2 = openType(cs, innerDC1, outerDC2, type2, unused, locator);
604-
auto openedType1 =
605-
openType(cs, innerDC2, outerDC1, type1, replacements, locator);
603+
auto openedType2 = openType(cs, innerDC2, outerDC2, type2, unused, locator);
604+
auto openedType1 = openType(cs, innerDC1, outerDC1, type1, replacements, locator);
606605

607606
for (auto replacement : replacements) {
608607
if (auto mapped = innerDC1->mapTypeIntoContext(replacement.first)) {

0 commit comments

Comments
 (0)