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 {
333333
334334 // Check whether this conformance is on an unavailable extension.
335335 auto concrete = getConcrete ();
336- auto *dc = concrete->getRootConformance ()->getDeclContext ();
337- auto ext = dyn_cast<ExtensionDecl>(dc);
336+ auto ext = dyn_cast<ExtensionDecl>(concrete->getDeclContext ());
338337 if (ext && AvailableAttr::isUnavailable (ext))
339338 return true ;
340339
Original file line number Diff line number Diff line change @@ -6773,6 +6773,9 @@ ProtocolConformance *swift::deriveImplicitSendableConformance(
67736773 auto inheritedConformance = checkConformance (
67746774 classDecl->mapTypeIntoContext (superclass),
67756775 proto, /* allowMissing=*/ false );
6776+ if (inheritedConformance.hasUnavailableConformance ())
6777+ inheritedConformance = ProtocolConformanceRef::forInvalid ();
6778+
67766779 if (inheritedConformance) {
67776780 inheritedConformance = inheritedConformance
67786781 .mapConformanceOutOfContext ();
You can’t perform that action at this time.
0 commit comments