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.hello() // expected-error{{only 'distributed' functions can be called on a potentially remote distributed actor}}
26
-
distributed.helloAsync() // expected-error{{only 'distributed' functions can be called on a potentially remote distributed actor}}
25
+
distributed.hello() // expected-error{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
26
+
distributed.helloAsync() // expected-error{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
27
27
// expected-error@-1{{expression is 'async' but is not marked with 'await'}}
28
28
// expected-note@-2{{call is 'async'}}
29
29
// {{expression is 'async' but is not marked with 'await'}}{{7-7=await }}
30
-
distributed.helloAsyncThrows() // expected-error{{only 'distributed' functions can be called on a potentially remote distributed actor}}
30
+
distributed.helloAsyncThrows() // expected-error{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
31
31
// expected-error@-1{{expression is 'async' but is not marked with 'await'}} // TODO: no need to diagnose this, it is impossible to call anyway
32
32
// expected-note@-2{{call is 'async'}}
33
33
// expected-error@-3{{call can throw, but it is not marked with 'try' and the error is not handled}} // TODO: no need to diagnose this, it is impossible to call anyway
// expected-error@-1{{'distributed' functions cannot be 'static'}}{10-21=}
106
+
// expected-error@-1{{'distributed' method cannot be 'static'}}{10-21=}
102
107
fatalError()
103
108
}
104
109
@@ -146,9 +151,9 @@ func test_outside(
146
151
_ =DistributedActor_1.staticFunc()
147
152
148
153
// ==== non-distributed functions
149
-
distributed.hello() // expected-error{{only 'distributed' functions can be called on a potentially remote distributed actor}}
150
-
_ =await distributed.helloAsync() // expected-error{{only 'distributed' functions can be called on a potentially remote distributed actor}}
151
-
_ =tryawait distributed.helloAsyncThrows() // expected-error{{only 'distributed' functions can be called on a potentially remote distributed actor}}
154
+
distributed.hello() // expected-error{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
155
+
_ =await distributed.helloAsync() // expected-error{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
156
+
_ =tryawait distributed.helloAsyncThrows() // expected-error{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
152
157
}
153
158
154
159
// ==== Protocols and static (non isolated functions)
0 commit comments