@@ -14,25 +14,22 @@ typealias DefaultDistributedActorSystem = FakeActorSystem
1414actor A : Actor { } // ok
1515
1616class C : Actor , UnsafeSendable {
17- // expected-error@-1{{non-actor type 'C' cannot conform to the 'AnyActor' protocol}} {{1-6=actor}}
18- // expected-error@-2{{non-actor type 'C' cannot conform to the 'Actor' protocol}} {{1-6=actor}}
19- // expected-warning@-3{{'UnsafeSendable' is deprecated: Use @unchecked Sendable instead}}
17+ // expected-error@-1{{non-actor type 'C' cannot conform to the 'Actor' protocol}} {{1-6=actor}}
18+ // expected-warning@-2{{'UnsafeSendable' is deprecated: Use @unchecked Sendable instead}}
2019 nonisolated var unownedExecutor : UnownedSerialExecutor {
2120 fatalError ( )
2221 }
2322}
2423
2524struct S : Actor {
26- // expected-error@-1{{non-class type 'S' cannot conform to class protocol 'AnyActor'}}
27- // expected-error@-2{{non-class type 'S' cannot conform to class protocol 'Actor'}}
25+ // expected-error@-1{{non-class type 'S' cannot conform to class protocol 'Actor'}}
2826 nonisolated var unownedExecutor : UnownedSerialExecutor {
2927 fatalError ( )
3028 }
3129}
3230
3331struct E : Actor {
34- // expected-error@-1{{non-class type 'E' cannot conform to class protocol 'AnyActor'}}
35- // expected-error@-2{{non-class type 'E' cannot conform to class protocol 'Actor'}}
32+ // expected-error@-1{{non-class type 'E' cannot conform to class protocol 'Actor'}}
3633 nonisolated var unownedExecutor : UnownedSerialExecutor {
3734 fatalError ( )
3835 }
@@ -65,8 +62,7 @@ actor A2: DistributedActor {
6562}
6663
6764final class DA2 : DistributedActor {
68- // expected-error@-1{{non-actor type 'DA2' cannot conform to the 'AnyActor' protocol}}
69- // expected-error@-2{{non-distributed actor type 'DA2' cannot conform to the 'DistributedActor' protocol}}
65+ // expected-error@-1{{non-distributed actor type 'DA2' cannot conform to the 'DistributedActor' protocol}}
7066 nonisolated var id : ID {
7167 fatalError ( )
7268 }
@@ -87,23 +83,22 @@ final class DA2: DistributedActor {
8783
8884struct S2 : DistributedActor {
8985 // expected-error@-1{{non-class type 'S2' cannot conform to class protocol 'DistributedActor'}}
90- // expected-error@-2{{non-class type 'S2' cannot conform to class protocol 'AnyActor'}}
91- // expected-error@-3{{type 'S2' does not conform to protocol 'Identifiable'}}
86+ // expected-error@-2{{type 'S2' does not conform to protocol 'Identifiable'}}
9287}
9388
9489// ==== -----------------------------------------------------------------------
9590
9691actor A3 : AnyActor { } // expected-warning {{'AnyActor' is deprecated: Use 'any Actor' with 'DistributedActor.asLocalActor' instead}}
9792distributed actor DA3 : AnyActor { } // expected-warning {{'AnyActor' is deprecated: Use 'any Actor' with 'DistributedActor.asLocalActor' instead}}
9893
99- class C3 : AnyActor , @ unchecked Sendable { // expected-warning {{'AnyActor' is deprecated: Use 'any Actor' with 'DistributedActor.asLocalActor' instead}}
100- // expected-error @-1{{non-actor type 'C3' cannot conform to the 'AnyActor' protocol}} {{1-6=actor }}
94+ class C3 : AnyActor { // expected-warning {{'AnyActor' is deprecated: Use 'any Actor' with 'DistributedActor.asLocalActor' instead}}
95+ // expected-warning @-1 {{non-final class 'C3' cannot conform to 'Sendable'; use '@unchecked Sendable' }}
10196}
10297
10398struct S3 : AnyActor { // expected-warning {{'AnyActor' is deprecated: Use 'any Actor' with 'DistributedActor.asLocalActor' instead}}
104- // expected-error@-1{{non-class type 'S3' cannot conform to class protocol 'AnyActor '}}
99+ // expected-error@-1{{only protocols can inherit from 'AnyObject '}}
105100}
106101
107102enum E3 : AnyActor { // expected-warning {{'AnyActor' is deprecated: Use 'any Actor' with 'DistributedActor.asLocalActor' instead}}
108- // expected-error@-1{{non-class type 'E3' cannot conform to class protocol 'AnyActor '}}
103+ // expected-error@-1{{only protocols can inherit from 'AnyObject '}}
109104}
0 commit comments