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(
342342 // reading in most conformances until we need them for devirtualization.
343343 // However, we *must* pull in shared clang-importer-derived conformances
344344 // 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)) {
346347 visitProtocolConformance (c, referencedFromInitExistential);
348+ }
347349 };
348350
349351 // For each entry in the witness table...
Original file line number Diff line number Diff line change 99
1010// BEGIN MyModule.swift
1111
12- public protocol ClassBound : AnyObject {
12+ public protocol Base : AnyObject {
13+ func bar( )
14+ }
15+
16+ public protocol ClassBound : Base {
1317 func foo( )
1418}
1519
@@ -18,6 +22,7 @@ class MyGenericClass<T> {
1822 init ( typ: String ) { self . typ = typ }
1923}
2024extension MyGenericClass : ClassBound {
25+ func bar( ) { print ( " MyGenericClass< \( typ) >.bar() " ) }
2126 func foo( ) { print ( " MyGenericClass< \( typ) >.foo() " ) }
2227}
2328
@@ -32,3 +37,5 @@ import MyModule
3237var arr : [ any ClassBound ] = [ factory ( ) ]
3338arr [ 0 ] . foo ( )
3439// 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