File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6219,7 +6219,11 @@ bool swift::checkSendableConformance(
62196219 return false ;
62206220
62216221 // If this is an always-unavailable conformance, there's nothing to check.
6222- if (auto ext = dyn_cast<ExtensionDecl>(conformanceDC)) {
6222+ // We always use the root conformance for this check, because inherited
6223+ // conformances need to walk back to the original declaration for the
6224+ // superclass conformance to find an unavailable attribute.
6225+ if (auto ext = dyn_cast<ExtensionDecl>(
6226+ conformance->getRootConformance ()->getDeclContext ())) {
62236227 if (AvailableAttr::isUnavailable (ext))
62246228 return false ;
62256229 }
Original file line number Diff line number Diff line change @@ -381,6 +381,14 @@ final class C7<T>: Sendable { }
381381
382382class C9 : Sendable { } // expected-warning{{non-final class 'C9' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
383383
384+ @available ( * , unavailable)
385+ extension HasUnavailableSendable : @unchecked Sendable { }
386+
387+ class HasUnavailableSendable {
388+ }
389+
390+ class NoRestated : HasUnavailableSendable { } // okay
391+
384392@globalActor
385393struct SomeActor {
386394 static let shared = A1 ( )
You can’t perform that action at this time.
0 commit comments