diff --git a/lib/IRGen/GenMeta.cpp b/lib/IRGen/GenMeta.cpp index 12c703064e5..028c1402bfd 100644 --- a/lib/IRGen/GenMeta.cpp +++ b/lib/IRGen/GenMeta.cpp @@ -817,9 +817,7 @@ namespace { conformance.getConcrete()->getType()->hasArchetype(); if (hasArchetype) { // Bind local Self type data from the metadata argument. - CanType selfInContext = - Proto->mapTypeIntoContext(Proto->getProtocolSelfType()) - ->getCanonicalType(); + auto selfInContext = Proto->getSelfTypeInContext()->getCanonicalType(); IGF.bindLocalTypeDataFromTypeMetadata(selfInContext, IsExact, self, MetadataState::Abstract); IGF.setUnscopedLocalTypeData(