Skip to content

Commit 60ef959

Browse files
committed
adjust last tests
1 parent 5316835 commit 60ef959

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

test/Concurrency/actor_isolation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,8 @@ actor A: Actor { // ok
10531053
@available(SwiftStdlib 5.1, *)
10541054
class C: Actor, UnsafeSendable {
10551055
// expected-error@-1{{non-actor type 'C' cannot conform to the 'Actor' protocol}}
1056-
// expected-warning@-2{{'UnsafeSendable' is deprecated: Use @unchecked Sendable instead}}
1056+
// expected-error@-2{{non-actor type 'C' cannot conform to the 'AnyActor' protocol}}
1057+
// expected-warning@-3{{'UnsafeSendable' is deprecated: Use @unchecked Sendable instead}}
10571058
nonisolated var unownedExecutor: UnownedSerialExecutor {
10581059
fatalError()
10591060
}

test/decl/class/actor/basic.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ actor MyActor { }
77
class MyActorSubclass1: MyActor { }
88
// expected-error@-1{{actor types do not support inheritance}}
99
// expected-error@-2{{type 'MyActorSubclass1' cannot conform to the 'Actor' protocol}}
10+
// expected-error@-3{{non-actor type 'MyActorSubclass1' cannot conform to the 'AnyActor' protocol}}
1011

1112
actor MyActorSubclass2: MyActor { } // expected-error{{actor types do not support inheritance}}
1213

test/decl/protocol/special/Actor.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ actor A7 {
4444
@available(SwiftStdlib 5.1, *)
4545
class C1: Actor {
4646
// expected-error@-1{{non-actor type 'C1' cannot conform to the 'Actor' protocol}}
47-
// expected-warning@-2{{non-final class 'C1' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
47+
// expected-error@-2{{non-actor type 'C1' cannot conform to the 'AnyActor' protocol}}
48+
// expected-warning@-3{{non-final class 'C1' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
4849
nonisolated var unownedExecutor: UnownedSerialExecutor {
4950
fatalError("")
5051
}
@@ -53,7 +54,8 @@ class C1: Actor {
5354
@available(SwiftStdlib 5.1, *)
5455
class C2: Actor {
5556
// expected-error@-1{{non-actor type 'C2' cannot conform to the 'Actor' protocol}}
56-
// expected-warning@-2{{non-final class 'C2' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
57+
// expected-error@-2{{non-actor type 'C2' cannot conform to the 'AnyActor' protocol}}
58+
// expected-warning@-3{{non-final class 'C2' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
5759
// FIXME: this should be an isolation violation
5860
var unownedExecutor: UnownedSerialExecutor {
5961
fatalError("")
@@ -64,7 +66,8 @@ class C2: Actor {
6466
class C3: Actor {
6567
// expected-error@-1{{type 'C3' does not conform to protocol 'Actor'}}
6668
// expected-error@-2{{non-actor type 'C3' cannot conform to the 'Actor' protocol}}
67-
// expected-warning@-3{{non-final class 'C3' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
69+
// expected-error@-3{{non-actor type 'C3' cannot conform to the 'AnyActor' protocol}}
70+
// expected-warning@-4{{non-final class 'C3' cannot conform to 'Sendable'; use '@unchecked Sendable'}}
6871
nonisolated func enqueue(_ job: UnownedJob) { }
6972
}
7073

0 commit comments

Comments
 (0)