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(
6193
6193
return false ;
6194
6194
6195
6195
// 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 ())) {
6197
6201
if (AvailableAttr::isUnavailable (ext))
6198
6202
return false ;
6199
6203
}
Original file line number Diff line number Diff line change @@ -380,6 +380,14 @@ final class C7<T>: Sendable { }
380
380
381
381
class C9 : Sendable { } // expected-warning{{non-final class 'C9' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
382
382
383
+ @available ( * , unavailable)
384
+ extension HasUnavailableSendable : @unchecked Sendable { }
385
+
386
+ class HasUnavailableSendable {
387
+ }
388
+
389
+ class NoRestated : HasUnavailableSendable { } // okay
390
+
383
391
@globalActor
384
392
struct SomeActor {
385
393
static let shared = A1 ( )
You can’t perform that action at this time.
0 commit comments