Skip to content

Commit 3994c46

Browse files
committed
Sema: Use getParameterType() instead of getOldType() in CSRanking.cpp
One last usage of getOldType() remains here, but it's actually meaningful since we want to handle InOutType there, so it will take more work to eliminate.
1 parent 77e9025 commit 3994c46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Sema/CSRanking.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@ bool CompareDeclSpecializationRequest::evaluate(
627627
// If they both have trailing closures, compare those separately.
628628
bool compareTrailingClosureParamsSeparately = false;
629629
if (numParams1 > 0 && numParams2 > 0 &&
630-
params1.back().getOldType()->is<AnyFunctionType>() &&
631-
params2.back().getOldType()->is<AnyFunctionType>()) {
630+
params1.back().getParameterType()->is<AnyFunctionType>() &&
631+
params2.back().getParameterType()->is<AnyFunctionType>()) {
632632
compareTrailingClosureParamsSeparately = true;
633633
}
634634

@@ -1132,8 +1132,8 @@ SolutionCompareResult ConstraintSystem::compareSolutions(
11321132
auto params = fnTy->getParams();
11331133
assert(params.size() == 2);
11341134

1135-
auto param1 = params[0].getOldType();
1136-
auto param2 = params[1].getOldType()->castTo<AnyFunctionType>();
1135+
auto param1 = params[0].getParameterType();
1136+
auto param2 = params[1].getParameterType()->castTo<AnyFunctionType>();
11371137

11381138
assert(param1->getOptionalObjectType());
11391139
assert(params[1].isAutoClosure());

0 commit comments

Comments
 (0)