File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -342,8 +342,10 @@ void SILLinkerVisitor::visitProtocolConformance(
342
342
// reading in most conformances until we need them for devirtualization.
343
343
// However, we *must* pull in shared clang-importer-derived conformances
344
344
// we potentially use, since we may not otherwise have a local definition.
345
- if (mustDeserializeProtocolConformance (Mod, c))
345
+ if ((isEmbedded && referencedFromInitExistential) ||
346
+ mustDeserializeProtocolConformance (Mod, c)) {
346
347
visitProtocolConformance (c, referencedFromInitExistential);
348
+ }
347
349
};
348
350
349
351
// For each entry in the witness table...
Original file line number Diff line number Diff line change 9
9
10
10
// BEGIN MyModule.swift
11
11
12
- public protocol ClassBound : AnyObject {
12
+ public protocol Base : AnyObject {
13
+ func bar( )
14
+ }
15
+
16
+ public protocol ClassBound : Base {
13
17
func foo( )
14
18
}
15
19
@@ -18,6 +22,7 @@ class MyGenericClass<T> {
18
22
init ( typ: String ) { self . typ = typ }
19
23
}
20
24
extension MyGenericClass : ClassBound {
25
+ func bar( ) { print ( " MyGenericClass< \( typ) >.bar() " ) }
21
26
func foo( ) { print ( " MyGenericClass< \( typ) >.foo() " ) }
22
27
}
23
28
@@ -32,3 +37,5 @@ import MyModule
32
37
var arr : [ any ClassBound ] = [ factory ( ) ]
33
38
arr [ 0 ] . foo ( )
34
39
// CHECK: MyGenericClass<String>.foo()
40
+ arr [ 0 ] . foo ( )
41
+ // CHECK: MyGenericClass<String>.bar()
You can’t perform that action at this time.
0 commit comments