Skip to content

Commit e18a61c

Browse files
committed
Sema: Remove unused parameter from getTypeOfReference()
1 parent 71ff168 commit e18a61c

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,7 @@ std::pair<Type, Type>
874874
ConstraintSystem::getTypeOfReference(ValueDecl *value,
875875
FunctionRefKind functionRefKind,
876876
ConstraintLocatorBuilder locator,
877-
DeclContext *useDC,
878-
const DeclRefExpr *base) {
877+
DeclContext *useDC) {
879878
if (value->getDeclContext()->isTypeContext() && isa<FuncDecl>(value)) {
880879
// Unqualified lookup can find operator names within nominal types.
881880
auto func = cast<FuncDecl>(value);
@@ -963,7 +962,8 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
963962
// Determine the type of the value, opening up that type if necessary.
964963
bool wantInterfaceType = !varDecl->getDeclContext()->isLocalContext();
965964
Type valueType =
966-
getUnopenedTypeOfReference(varDecl, Type(), useDC, base, wantInterfaceType);
965+
getUnopenedTypeOfReference(varDecl, Type(), useDC, /*base=*/nullptr,
966+
wantInterfaceType);
967967

968968
assert(!valueType->hasUnboundGenericType() &&
969969
!valueType->hasTypeParameter());
@@ -1185,7 +1185,7 @@ ConstraintSystem::getTypeOfMemberReference(
11851185

11861186
// If the base is a module type, just use the type of the decl.
11871187
if (baseObjTy->is<ModuleType>()) {
1188-
return getTypeOfReference(value, functionRefKind, locator, useDC, base);
1188+
return getTypeOfReference(value, functionRefKind, locator, useDC);
11891189
}
11901190

11911191
FunctionType::Param baseObjParam(baseObjTy);

lib/Sema/ConstraintSystem.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2279,8 +2279,7 @@ class ConstraintSystem {
22792279
ValueDecl *decl,
22802280
FunctionRefKind functionRefKind,
22812281
ConstraintLocatorBuilder locator,
2282-
DeclContext *useDC,
2283-
const DeclRefExpr *base = nullptr);
2282+
DeclContext *useDC);
22842283

22852284
/// Return the type-of-reference of the given value.
22862285
///

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,14 +885,12 @@ swift::matchWitness(TypeChecker &tc,
885885
= cs->getTypeOfMemberReference(selfTy, witness, dc,
886886
/*isDynamicResult=*/false,
887887
FunctionRefKind::DoubleApply,
888-
witnessLocator,
889-
/*base=*/nullptr);
888+
witnessLocator);
890889
} else {
891890
std::tie(openedFullWitnessType, openWitnessType)
892891
= cs->getTypeOfReference(witness,
893892
FunctionRefKind::DoubleApply,
894-
witnessLocator,
895-
/*base=*/nullptr);
893+
witnessLocator, /*useDC=*/nullptr);
896894
}
897895
openWitnessType = openWitnessType->getRValueType();
898896

0 commit comments

Comments
 (0)