Skip to content

Commit 7687935

Browse files
committed
Revert "[ProtocolConformance] Compute the correct un-availability for inherited"
This reverts commit b66aed3.
1 parent c9331be commit 7687935

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/AST/ProtocolConformanceRef.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ bool ProtocolConformanceRef::hasUnavailableConformance() const {
287287

288288
// Check whether this conformance is on an unavailable extension.
289289
auto concrete = getConcrete();
290-
auto *dc = concrete->getRootConformance()->getDeclContext();
291-
auto ext = dyn_cast<ExtensionDecl>(dc);
290+
auto ext = dyn_cast<ExtensionDecl>(concrete->getDeclContext());
292291
if (ext && AvailableAttr::isUnavailable(ext))
293292
return true;
294293

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6513,6 +6513,9 @@ ProtocolConformance *swift::deriveImplicitSendableConformance(
65136513
auto inheritedConformance = classModule->checkConformance(
65146514
classDecl->mapTypeIntoContext(superclass),
65156515
proto, /*allowMissing=*/false);
6516+
if (inheritedConformance.hasUnavailableConformance())
6517+
inheritedConformance = ProtocolConformanceRef::forInvalid();
6518+
65166519
if (inheritedConformance) {
65176520
inheritedConformance = inheritedConformance
65186521
.mapConformanceOutOfContext();

0 commit comments

Comments
 (0)