mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: Resolve inherited types when computing unsatisfiable conformances.
Previously, unsatisfiable conformances could be omitted from emitted `.swiftinterface` files in lazy typechecking mode since inherited types might be unresolved when gathering the conformances. Adding these test cases also revealed that serialization restrictions needed to be relaxed in order to accomodate unsatisfiable conformances.
This commit is contained in:
@@ -527,8 +527,9 @@ class InheritedProtocolCollector {
|
||||
/// For each type directly inherited by \p extension, record any protocols
|
||||
/// that we would have printed in ConditionalConformanceProtocols.
|
||||
void recordConditionalConformances(const ExtensionDecl *extension) {
|
||||
for (TypeLoc inherited : extension->getInherited().getEntries()) {
|
||||
Type inheritedTy = inherited.getType();
|
||||
auto inheritedTypes = extension->getInherited();
|
||||
for (unsigned i : inheritedTypes.getIndices()) {
|
||||
Type inheritedTy = inheritedTypes.getResolvedType(i);
|
||||
if (!inheritedTy || !inheritedTy->isExistentialType())
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user