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
// expected-warning @-1 {{non-sendable type 'NonSendable' passed in implicitly asynchronous call to main actor-isolated property 'x' cannot cross actor boundary}}
286
286
}
287
+
288
+
@available(SwiftStdlib 5.1,*)
289
+
@Sendable
290
+
func globalSendable(_ ns:NonSendable)async{}
291
+
292
+
@available(SwiftStdlib 5.1,*)
293
+
@MainActor
294
+
func callNonisolatedAsyncClosure(
295
+
ns:NonSendable,
296
+
g:(NonSendable)async->Void
297
+
)async{
298
+
// FIXME: Both cases below should also produce a diagnostic with SendNonSendable,
299
+
// because the 'ns' parameter should be merged into the MainActor's region.
300
+
301
+
awaitg(ns)
302
+
// expected-targeted-and-complete-warning@-1 {{passing argument of non-sendable type 'NonSendable' outside of main actor-isolated context may introduce data races}}
// expected-targeted-and-complete-warning@-1 {{passing argument of non-sendable type 'NonSendable' outside of main actor-isolated context may introduce data races}}
0 commit comments