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
awaittransferToMain(actorCaptureClosure) // expected-complete-warning {{passing argument of non-sendable type '() -> ()' into main actor-isolated context may introduce data races}}
197
197
// expected-complete-note @-1 {{a function type must be marked '@Sendable' to conform to 'Sendable'}}
198
-
// expected-tns-warning @-2 {{transferring 'actorCaptureClosure' may cause a race}}
199
-
// expected-tns-note @-3 {{transferring nonisolated 'actorCaptureClosure' to main actor-isolated callee could cause races between main actor-isolated and nonisolated uses}}
200
198
201
199
actorCaptureClosure ={print(a)}
202
200
awaittransferToMain(actorCaptureClosure) // expected-complete-warning {{passing argument of non-sendable type '() -> ()' into main actor-isolated context may introduce data races}}
203
201
// expected-complete-note @-1 {{a function type must be marked '@Sendable' to conform to 'Sendable'}}
204
-
// expected-tns-warning @-2 {{transferring 'actorCaptureClosure' may cause a race}}
205
-
// expected-tns-note @-3 {{transferring nonisolated 'actorCaptureClosure' to main actor-isolated callee could cause races between main actor-isolated and nonisolated uses}}
awaittransferToMain(closure) // expected-complete-warning {{passing argument of non-sendable type '() -> ()' into main actor-isolated context may introduce data races}}
405
401
// expected-complete-note @-1 {{a function type must be marked '@Sendable' to conform to 'Sendable'}}
406
-
// expected-tns-warning @-2 {{transferring 'closure' may cause a race}}
407
-
// expected-tns-note @-3 {{transferring nonisolated 'closure' to main actor-isolated callee could cause races between main actor-isolated and nonisolated uses}}
awaittransferToMain(closure) // expected-complete-warning {{passing argument of non-sendable type '() -> ()' into main actor-isolated context may introduce data races}}
443
437
// expected-complete-note @-1 {{a function type must be marked '@Sendable' to conform to 'Sendable'}}
444
-
// expected-tns-warning @-2 {{transferring 'closure' may cause a race}}
445
-
// expected-tns-note @-3 {{transferring nonisolated 'closure' to main actor-isolated callee could cause races between main actor-isolated and nonisolated uses}}
0 commit comments