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 {{cannot convert '@isolated(any) @Sendable () async -> NonSendable' to '() async -> NonSendable' because crossing of an isolation boundary requires parameter and result types to conform to 'Sendable' protocol}}
142
142
143
143
144
-
let _:@concurrent(NonSendable)async->Void= caller1 // expected-note {{type 'NonSendable' does not conform to 'Sendable' protocol}}
145
-
// expected-warning@-1 {{cannot convert 'nonisolated(nonsending) @Sendable (NonSendable) async -> Void' to '(NonSendable) async -> Void' because crossing of an isolation boundary requires parameter and result types to conform to 'Sendable' protocol}}
146
-
let _:@concurrent()async->NonSendable= caller2 // expected-note {{type 'NonSendable' does not conform to 'Sendable' protocol}}
147
-
// expected-warning@-1 {{cannot convert 'nonisolated(nonsending) @Sendable () async -> NonSendable' to '() async -> NonSendable' because crossing of an isolation boundary requires parameter and result types to conform to 'Sendable' protocol}}
144
+
// Calling `nonisolated(nonsending)` from `@concurrent` doesn't cross an isolation boundary.
145
+
let _:@concurrent(NonSendable)async->Void= caller1 // Ok
146
+
let _:@concurrent()async->NonSendable= caller2 // Ok
148
147
149
148
let _:@MainActor(NonSendable)async->Void= nonIsolated1 // Ok
150
149
let _:@MainActor(NonSendable)async->Void= nonIsolated2 // expected-note {{type 'NonSendable' does not conform to 'Sendable' protocol}}
0 commit comments