Skip to content

Commit 26241a5

Browse files
committed
AST: Remove DependentMemberType::substBaseType()
1 parent da0130d commit 26241a5

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

include/swift/AST/Types.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7158,17 +7158,6 @@ class DependentMemberType : public TypeBase {
71587158
AssociatedTypeDecl *getAssocType() const {
71597159
return NameOrAssocType.dyn_cast<AssociatedTypeDecl *>();
71607160
}
7161-
7162-
/// Substitute the base type, looking up our associated type in it if it is
7163-
/// non-dependent. Returns null if the member could not be found in the new
7164-
/// base.
7165-
Type substBaseType(Type base);
7166-
7167-
/// Substitute the base type, looking up our associated type in it if it is
7168-
/// non-dependent. Returns null if the member could not be found in the new
7169-
/// base.
7170-
Type substBaseType(Type base, LookupConformanceFn lookupConformance,
7171-
SubstOptions options);
71727161

71737162
// Implement isa/cast/dyncast/etc.
71747163
static bool classof(const TypeBase *T) {

lib/AST/TypeSubstitution.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -264,24 +264,6 @@ operator()(CanType dependentType, Type conformingReplacementType,
264264
return ProtocolConformanceRef(conformedProtocol);
265265
}
266266

267-
Type DependentMemberType::substBaseType(Type substBase) {
268-
return substBaseType(substBase, LookUpConformanceInModule(),
269-
std::nullopt);
270-
}
271-
272-
Type DependentMemberType::substBaseType(Type substBase,
273-
LookupConformanceFn lookupConformance,
274-
SubstOptions options) {
275-
if (substBase.getPointer() == getBase().getPointer() &&
276-
substBase->hasTypeParameter())
277-
return this;
278-
279-
InFlightSubstitution IFS(nullptr, lookupConformance, options);
280-
return getMemberForBaseType(IFS, getBase(), substBase,
281-
getAssocType(), getName(),
282-
/*level=*/0);
283-
}
284-
285267
static Type substGenericFunctionType(GenericFunctionType *genericFnType,
286268
InFlightSubstitution &IFS) {
287269
// Substitute into the function type (without generic signature).

0 commit comments

Comments
 (0)