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-note@+1{{consider making generic parameter 'Message' conform to the 'Sendable' protocol}} {{29-29=, Sendable}}
131
-
func send<Message:Codable>(message:Message)throws->String{""} // expected-warning{{non-sendable type 'Message' in parameter of actor-isolated instance method 'send(message:)' satisfying protocol requirement cannot cross actor boundary}}
137
+
func send<Message:Codable&Sendable>(message:Message)throws->String{""} // OK
132
138
}
133
139
134
140
protocolAsyncThrowsAll{
@@ -140,9 +146,15 @@ actor LocalOK_AsyncThrowsAll: AsyncThrowsAll {
da.terminated(da:"the terminated func is not distributed") // expected-error{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
tryawait da.terminated(da:"the terminated func is not distributed")
223
+
// expected-error@-1{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
224
+
// expected-warning@-2{{no calls to throwing functions occur within 'try' expression}}
225
+
226
+
let__secretlyKnownToBeLocal= da
227
+
await __secretlyKnownToBeLocal.terminated(da:"local calls are okey!") // OK // FIXME(#59356): (the __secretlyKnown is a hack, but the whenLocal crashes now on pending isolation getting with generic actors for closures)
228
+
// FIXME: pending fix of closure isolation checking with actors #59356
229
+
// await da.whenLocal { __secretlyKnownToBeLocal in
230
+
// await __secretlyKnownToBeLocal.terminated(da: "local calls are okey!") // OK
tryawait wda.terminated(da:"the terminated func is not distributed")
237
+
// expected-error@-1{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
238
+
// expected-warning@-2{{no calls to throwing functions occur within 'try' expression}}
239
+
240
+
let__secretlyKnownToBeLocal= wda
241
+
await __secretlyKnownToBeLocal.terminated(da:"local calls are okey!") // OK // FIXME(#59356): (the __secretlyKnown is a hack, but the whenLocal crashes now on pending isolation getting with generic actors for closures)
242
+
// FIXME: pending fix of closure isolation checking with actors #59356
243
+
// await wda.whenLocal { __secretlyKnownToBeLocal in
244
+
// await __secretlyKnownToBeLocal.terminated(da: "local calls are okey!") // OK
0 commit comments