Skip to content

Commit 125e54c

Browse files
committed
AST: Simplify SubstitutionMap::lookupConformance()
1 parent 948a698 commit 125e54c

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

lib/AST/SubstitutionMap.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -234,19 +234,6 @@ SubstitutionMap::lookupConformance(CanType type, ProtocolDecl *proto) const {
234234
if (empty())
235235
return ProtocolConformanceRef::forInvalid();
236236

237-
// If we have an archetype, map out of the context so we can compute a
238-
// conformance access path.
239-
if (auto archetype = dyn_cast<ArchetypeType>(type)) {
240-
if (!isa<OpaqueTypeArchetypeType>(archetype)) {
241-
type = archetype->getInterfaceType()->getCanonicalType();
242-
}
243-
}
244-
245-
// Error path: if we don't have a type parameter, there is no conformance.
246-
// FIXME: Query concrete conformances in the generic signature?
247-
if (!type->isTypeParameter())
248-
return ProtocolConformanceRef::forInvalid();
249-
250237
auto genericSig = getGenericSignature();
251238

252239
auto getSignatureConformance =

0 commit comments

Comments
 (0)