You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/Concurrency/transfernonsendable_global_actor_sending.swift
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,8 @@ func useValue<T>(_ t: T) {}
34
34
@MainActorfunc testGlobalFakeInit(){
35
35
letns=NonSendableKlass()
36
36
37
-
// Will be resolved once @MainActor is @Sendable.
38
-
Task.fakeInit{@MainActorin // expected-error {{passing closure as a 'sending' parameter risks causing data races between main actor-isolated code and concurrent execution of the closure}}
39
-
print(ns) // expected-note {{closure captures 'ns' which is accessible to main actor-isolated code}}
0 commit comments