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
[Distributed] Implement distributed actor semantics in call checking
The move to perform all call checking that can cross concurrency
domains into one place dropped the specific logic for distributed
actor calls. Introduce that logic, cleaning it up to consistently use
the "known to be local" semantics needed for distributed actors.
Copy file name to clipboardExpand all lines: test/Distributed/distributed_actor_isolation.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -207,10 +207,10 @@ distributed actor DijonMustard {
207
207
208
208
convenienceinit(conv:FakeActorSystem){ // expected-warning {{initializers in actors are not marked with 'convenience'; this is an error in Swift 6}}{{3-15=}}
209
209
self.init(system: conv)
210
-
self.f() // expected-error {{actor-isolated instance method 'f()' can not be referenced from a non-isolated context}}
210
+
self.f() // expected-error {{call to actor-isolated instance method 'f()' in a synchronous nonisolated context}}
func f(){} // expected-note {{calls to instance method 'f()' from outside of its actor context are implicitly asynchronous}}
214
214
215
215
nonisolatedinit(conv2:FakeActorSystem){ // expected-warning {{'nonisolated' on an actor's synchronous initializer is invalid; this is an error in Swift 6}} {{3-15=}}
letns=await a.getRef() // expected-warning {{non-sendable type 'NotSendableMO' returned by implicitly asynchronous call to actor-isolated instance method 'getRef()' cannot cross actor boundary}}
53
-
awaittakeNotSendable(ns) // expected-warning {{non-sendable type 'NotSendableMO' exiting main actor-isolated context in call to non-isolated global function 'takeNotSendable' cannot cross actor boundary}}
52
+
letns=await a.getRef() // expected-warning {{non-sendable type 'NotSendableMO' returned by call to actor-isolated function cannot cross actor boundary}}
53
+
awaittakeNotSendable(ns) // expected-warning {{passing argument of non-sendable type 'NotSendableMO' outside of main actor-isolated context may introduce data races}}
0 commit comments