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 @@ -333,8 +333,7 @@ bool ProtocolConformanceRef::hasUnavailableConformance() const {
333
333
334
334
// Check whether this conformance is on an unavailable extension.
335
335
auto concrete = getConcrete ();
336
- auto *dc = concrete->getRootConformance ()->getDeclContext ();
337
- auto ext = dyn_cast<ExtensionDecl>(dc);
336
+ auto ext = dyn_cast<ExtensionDecl>(concrete->getDeclContext ());
338
337
if (ext && AvailableAttr::isUnavailable (ext))
339
338
return true ;
340
339
Original file line number Diff line number Diff line change @@ -6773,6 +6773,9 @@ ProtocolConformance *swift::deriveImplicitSendableConformance(
6773
6773
auto inheritedConformance = checkConformance (
6774
6774
classDecl->mapTypeIntoContext (superclass),
6775
6775
proto, /* allowMissing=*/ false );
6776
+ if (inheritedConformance.hasUnavailableConformance ())
6777
+ inheritedConformance = ProtocolConformanceRef::forInvalid ();
6778
+
6776
6779
if (inheritedConformance) {
6777
6780
inheritedConformance = inheritedConformance
6778
6781
.mapConformanceOutOfContext ();
You can’t perform that action at this time.
0 commit comments