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 @@ -6193,7 +6193,11 @@ bool swift::checkSendableConformance(
61936193 return false ;
61946194
61956195 // If this is an always-unavailable conformance, there's nothing to check.
6196- if (auto ext = dyn_cast<ExtensionDecl>(conformanceDC)) {
6196+ // We always use the root conformance for this check, because inherited
6197+ // conformances need to walk back to the original declaration for the
6198+ // superclass conformance to find an unavailable attribute.
6199+ if (auto ext = dyn_cast<ExtensionDecl>(
6200+ conformance->getRootConformance ()->getDeclContext ())) {
61976201 if (AvailableAttr::isUnavailable (ext))
61986202 return false ;
61996203 }
Original file line number Diff line number Diff line change @@ -380,6 +380,14 @@ final class C7<T>: Sendable { }
380380
381381class C9 : Sendable { } // expected-warning{{non-final class 'C9' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
382382
383+ @available ( * , unavailable)
384+ extension HasUnavailableSendable : @unchecked Sendable { }
385+
386+ class HasUnavailableSendable {
387+ }
388+
389+ class NoRestated : HasUnavailableSendable { } // okay
390+
383391@globalActor
384392struct SomeActor {
385393 static let shared = A1 ( )
You can’t perform that action at this time.
0 commit comments