File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
test/Serialization/Recovery Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3517,7 +3517,9 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
3517
3517
for (auto element : proto->getInherited ()) {
3518
3518
auto elementType = element.getType ();
3519
3519
assert (!elementType || !elementType->hasArchetype ());
3520
- if (elementType && elementType->is <ProtocolType>())
3520
+ if (elementType &&
3521
+ (elementType->is <ProtocolType>() ||
3522
+ elementType->is <ProtocolCompositionType>()))
3521
3523
dependencyTypes.insert (elementType);
3522
3524
}
3523
3525
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ public protocol HiddenProtocol {
43
43
associatedtype Value
44
44
}
45
45
46
+ public protocol HiddenProtocol2 { }
47
+
46
48
public protocol HiddenProtocolWithOverride {
47
49
func hiddenOverride( )
48
50
}
@@ -98,6 +100,15 @@ public class SomeClass {
98
100
func funcUsingIoiType( _ a: HiddenClass ) { }
99
101
}
100
102
103
+ // Check that we recover from a reference to an implementation-only
104
+ // imported type in a protocol composition. rdar://78631465
105
+ protocol CompositionMemberInheriting : HiddenProtocol2 { }
106
+ protocol CompositionMemberSimple { }
107
+ protocol InheritingFromComposition : CompositionMemberInheriting & CompositionMemberSimple { }
108
+ struct StructInheritingFromComposition : CompositionMemberInheriting & CompositionMemberSimple { }
109
+ class ClassInheritingFromComposition : CompositionMemberInheriting & CompositionMemberSimple { }
110
+ protocol InheritingFromCompositionDirect : CompositionMemberSimple & HiddenProtocol2 { }
111
+
101
112
#elseif CLIENT_APP
102
113
103
114
import public_lib
You can’t perform that action at this time.
0 commit comments