File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -663,13 +663,11 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol) {
663
663
if (auto inherited = dyn_cast<InheritedProtocolConformance>(conformance)) {
664
664
// Dig out the conforming nominal type.
665
665
auto rootConformance = inherited->getRootNormalConformance ();
666
- auto conformingNominal
666
+ auto conformingClass
667
667
= rootConformance->getType ()->getClassOrBoundGenericClass ();
668
668
669
669
// Map up to our superclass's type.
670
- Type superclassTy = type->getSuperclass ();
671
- while (superclassTy->getAnyNominal () != conformingNominal)
672
- superclassTy = superclassTy->getSuperclass ();
670
+ auto superclassTy = type->getSuperclassForDecl (conformingClass);
673
671
674
672
// Compute the conformance for the inherited type.
675
673
auto inheritedConformance = lookupConformance (superclassTy, protocol);
You can’t perform that action at this time.
0 commit comments