File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -451,8 +451,12 @@ void TBDGenVisitor::addConformances(DeclContext *DC) {
451
451
if (!rootConformance) {
452
452
continue ;
453
453
}
454
-
455
- addSymbol (LinkEntity::forProtocolWitnessTable (rootConformance));
454
+ // We cannot emit the witness table symbol if the protocol is imported from
455
+ // another module and it's resilient, because initialization of that protocol
456
+ // is necessary in this case
457
+ if (!rootConformance->getProtocol ()->isResilient (DC->getParentModule (),
458
+ ResilienceExpansion::Maximal))
459
+ addSymbol (LinkEntity::forProtocolWitnessTable (rootConformance));
456
460
addSymbol (LinkEntity::forProtocolConformanceDescriptor (rootConformance));
457
461
458
462
// FIXME: the logic around visibility in extensions is confusing, and
Original file line number Diff line number Diff line change
1
+ // REQUIRES: VENDOR=apple
2
+ // RUN: %empty-directory(%t)
3
+ // RUN: %target-swift-frontend -parse-as-library -module-name test -validate-tbd-against-ir=all %s -enable-library-evolution -emit-tbd -emit-tbd-path %t.result.tbd -tbd-is-installapi -parse-as-library -emit-ir -o/dev/null
4
+
5
+ public enum TestError : Error {
6
+ case unsupportedVersion( Int )
7
+ }
You can’t perform that action at this time.
0 commit comments