File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -287,8 +287,7 @@ bool ProtocolConformanceRef::hasUnavailableConformance() const {
287
287
288
288
// Check whether this conformance is on an unavailable extension.
289
289
auto concrete = getConcrete ();
290
- auto *dc = concrete->getRootConformance ()->getDeclContext ();
291
- auto ext = dyn_cast<ExtensionDecl>(dc);
290
+ auto ext = dyn_cast<ExtensionDecl>(concrete->getDeclContext ());
292
291
if (ext && AvailableAttr::isUnavailable (ext))
293
292
return true ;
294
293
Original file line number Diff line number Diff line change @@ -6513,6 +6513,9 @@ ProtocolConformance *swift::deriveImplicitSendableConformance(
6513
6513
auto inheritedConformance = classModule->checkConformance (
6514
6514
classDecl->mapTypeIntoContext (superclass),
6515
6515
proto, /* allowMissing=*/ false );
6516
+ if (inheritedConformance.hasUnavailableConformance ())
6517
+ inheritedConformance = ProtocolConformanceRef::forInvalid ();
6518
+
6516
6519
if (inheritedConformance) {
6517
6520
inheritedConformance = inheritedConformance
6518
6521
.mapConformanceOutOfContext ();
You can’t perform that action at this time.
0 commit comments