[Concurrency] Obsolete AnyActor in Swift 6 using a typealias.

This commit is contained in:
Holly Borla
2024-05-29 22:59:19 -07:00
parent 1011e4ddb0
commit c20b0e0956
14 changed files with 25 additions and 53 deletions

View File

@@ -7,8 +7,7 @@ actor MyActor { }
class MyActorSubclass1: MyActor { }
// expected-error@-1{{actor types do not support inheritance}}
// expected-error@-2{{type 'MyActorSubclass1' cannot conform to the 'Actor' protocol}}
// expected-error@-3{{non-actor type 'MyActorSubclass1' cannot conform to the 'AnyActor' protocol}}
// expected-warning@-4 {{non-final class 'MyActorSubclass1' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode}}
// expected-warning@-3 {{non-final class 'MyActorSubclass1' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode}}
actor MyActorSubclass2: MyActor { } // expected-error{{actor types do not support inheritance}}