Skip to content

Commit a19ee63

Browse files
committed
AST: Remove useless overload of GenericEnvironment::mapTypeIntoContext()
1 parent eaf06ea commit a19ee63

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

include/swift/AST/GenericEnvironment.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
157157
friend ArchetypeType;
158158
friend QueryInterfaceTypeSubstitutions;
159159

160-
Type getOrCreateArchetypeFromInterfaceType(Type depType);
161-
162160
/// Add a mapping of a generic parameter to a specific type (which may be
163161
/// an archetype)
164162
void addMapping(GenericParamKey key, Type contextType);
@@ -283,13 +281,12 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final
283281
/// Map an interface type to a contextual type.
284282
Type mapTypeIntoContext(Type type) const;
285283

286-
/// Map an interface type to a contextual type.
287-
Type mapTypeIntoContext(Type type,
288-
LookupConformanceFn lookupConformance) const;
289-
290284
/// Map a generic parameter type to a contextual type.
291285
Type mapTypeIntoContext(GenericTypeParamType *type) const;
292286

287+
/// Map a type parameter type to a contextual type.
288+
Type getOrCreateArchetypeFromInterfaceType(Type depType);
289+
293290
/// Map an interface type containing parameter packs to a contextual
294291
/// type in the opened element generic context.
295292
Type mapPackTypeIntoElementContext(Type type) const;

lib/AST/GenericEnvironment.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -507,21 +507,14 @@ Type QueryInterfaceTypeSubstitutions::operator()(SubstitutableType *type) const{
507507
return Type();
508508
}
509509

510-
Type GenericEnvironment::mapTypeIntoContext(
511-
Type type,
512-
LookupConformanceFn lookupConformance) const {
510+
Type GenericEnvironment::mapTypeIntoContext(Type type) const {
513511
assert(!type->hasPrimaryArchetype() && "already have a contextual type");
514512

515513
Type result = type.subst(QueryInterfaceTypeSubstitutions(this),
516-
lookupConformance,
514+
LookUpConformanceInModule(),
517515
SubstFlags::PreservePackExpansionLevel);
518516
ASSERT(getKind() != Kind::Primary || !result->hasTypeParameter());
519517
return result;
520-
521-
}
522-
523-
Type GenericEnvironment::mapTypeIntoContext(Type type) const {
524-
return mapTypeIntoContext(type, LookUpConformanceInModule());
525518
}
526519

527520
Type GenericEnvironment::mapTypeIntoContext(GenericTypeParamType *type) const {

0 commit comments

Comments
 (0)