mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Embedded: support existentials with inherited conformances
That means: derived classes where the base conforms to a protocol
This commit is contained in:
@@ -541,6 +541,9 @@ SILModule::lookUpFunctionInWitnessTable(ProtocolConformanceRef C,
|
||||
linker.processConformance(C);
|
||||
}
|
||||
ProtocolConformance *conf = C.getConcrete();
|
||||
if (auto *inheritedC = dyn_cast<InheritedProtocolConformance>(conf))
|
||||
conf = inheritedC->getInheritedConformance();
|
||||
|
||||
if (!isa<SpecializedProtocolConformance>(conf) || !lookupInSpecializedWitnessTable) {
|
||||
conf = conf->getRootConformance();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user