Skip to content

Commit ca9ba77

Browse files
committed
[Concurrency] Adjust tests for renamed initializer
1 parent a0e5530 commit ca9ba77

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

test/Concurrency/Runtime/actor_isIsolatingCurrentContext.swift

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,6 @@ final class IsIsolatingExecutor: SerialExecutor {
3636
}
3737
}
3838

39-
@available(SwiftStdlib 6.2, *)
40-
final class NoChecksImplementedExecutor: SerialExecutor {
41-
init() {}
42-
43-
func enqueue(_ job: consuming ExecutorJob) {
44-
job.runSynchronously(on: self.asUnownedSerialExecutor())
45-
}
46-
47-
func asUnownedSerialExecutor() -> UnownedSerialExecutor {
48-
UnownedSerialExecutor(ordinary: self)
49-
}
50-
}
51-
52-
@available(SwiftStdlib 6.2, *)
53-
final class JustCheckIsolatedExecutor: SerialExecutor {
54-
init() {}
55-
56-
func enqueue(_ job: consuming ExecutorJob) {
57-
job.runSynchronously(on: self.asUnownedSerialExecutor())
58-
}
59-
60-
func asUnownedSerialExecutor() -> UnownedSerialExecutor {
61-
UnownedSerialExecutor(ordinary: self)
62-
}
63-
64-
func checkIsolated() {
65-
print("called: checkIsolated")
66-
}
67-
}
68-
6939
@available(SwiftStdlib 6.2, *)
7040
actor ActorOnIsCheckImplementingExecutor<Ex: SerialExecutor> {
7141
let executor: Ex

test/Concurrency/transfernonsendable.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ extension MyActor {
17671767
_ = sc
17681768

17691769
Task { // expected-tns-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1770-
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to initializer 'init(priority:operation:)' risks causing races in between local and caller code}}
1770+
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to initializer 'init(name:priority:operation:)' risks causing races in between local and caller code}}
17711771
_ = sc
17721772
}
17731773

@@ -1975,7 +1975,7 @@ func mutableLocalCaptureDataRace() async {
19751975
_ = x
19761976

19771977
Task.detached { x = 1 } // expected-tns-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1978-
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(priority:operation:)' risks causing races in between local and caller code}}
1978+
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(name:priority:operation:)' risks causing races in between local and caller code}}
19791979

19801980
x = 2 // expected-tns-note {{access can happen concurrently}}
19811981
}
@@ -1985,7 +1985,7 @@ func mutableLocalCaptureDataRace2() async {
19851985
x = 0
19861986

19871987
Task.detached { x = 1 } // expected-tns-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1988-
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(priority:operation:)' risks causing races in between local and caller code}}
1988+
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(name:priority:operation:)' risks causing races in between local and caller code}}
19891989

19901990
print(x) // expected-tns-note {{access can happen concurrently}}
19911991
}

0 commit comments

Comments
 (0)