Revert "Preserve SIL when merging modules"

This commit is contained in:
Slava Pestov
2017-09-14 19:04:18 -07:00
committed by GitHub
parent 2ba1ca2d8f
commit 7ea93d9ed0
5 changed files with 8 additions and 34 deletions

View File

@@ -663,11 +663,13 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol) {
if (auto inherited = dyn_cast<InheritedProtocolConformance>(conformance)) {
// Dig out the conforming nominal type.
auto rootConformance = inherited->getRootNormalConformance();
auto conformingClass
auto conformingNominal
= rootConformance->getType()->getClassOrBoundGenericClass();
// Map up to our superclass's type.
auto superclassTy = type->getSuperclassForDecl(conformingClass);
Type superclassTy = type->getSuperclass();
while (superclassTy->getAnyNominal() != conformingNominal)
superclassTy = superclassTy->getSuperclass();
// Compute the conformance for the inherited type.
auto inheritedConformance = lookupConformance(superclassTy, protocol);