mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: Resolve inherited types when recording indirect conformances.
Previously, indirect public conformances provided by conforming to an internal protocol could be skipped in a `.swiftinterface` in lazy typechecking mode since inherited types might not be resolved before collecting the indirect conformances.
This commit is contained in:
@@ -483,8 +483,8 @@ class InheritedProtocolCollector {
|
||||
bool skipExtra = false) {
|
||||
llvm::Optional<AvailableAttrList> availableAttrs;
|
||||
|
||||
for (InheritedEntry inherited : directlyInherited.getEntries()) {
|
||||
Type inheritedTy = inherited.getType();
|
||||
for (int i : directlyInherited.getIndices()) {
|
||||
Type inheritedTy = directlyInherited.getResolvedType(i);
|
||||
if (!inheritedTy || !inheritedTy->isExistentialType())
|
||||
continue;
|
||||
|
||||
@@ -492,6 +492,7 @@ class InheritedProtocolCollector {
|
||||
if (!canPrintNormally && skipExtra)
|
||||
continue;
|
||||
|
||||
auto inherited = directlyInherited.getEntry(i);
|
||||
ExistentialLayout layout = inheritedTy->getExistentialLayout();
|
||||
for (ProtocolDecl *protoDecl : layout.getProtocols()) {
|
||||
if (canPrintNormally)
|
||||
|
||||
Reference in New Issue
Block a user