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
// effectful properties from outside the actor instance
177
177
178
-
// expected-warning@+2 {{cannot use property 'effPropA' with a non-sendable type 'Box' across actors}}
178
+
// expected-warning@+2 {{non-sendable type 'Box' in asynchronous access to actor-isolated property 'effPropA' cannot cross actor boundary}}
179
179
// expected-error@+1{{expression is 'async' but is not marked with 'await'}} {{7-7=await }} expected-note@+1{{property access is 'async'}}
180
180
_ = a.effPropA
181
181
182
-
// expected-warning@+3 {{cannot use property 'effPropT' with a non-sendable type 'Box' across actors}}
182
+
// expected-warning@+3 {{non-sendable type 'Box' in implicitly asynchronous access to actor-isolated property 'effPropT' cannot cross actor boundary}}
183
183
// expected-error@+2{{property access can throw, but it is not marked with 'try' and the error is not handled}}
184
184
// expected-error@+1{{expression is 'async' but is not marked with 'await'}} {{7-7=await }} expected-note@+1{{property access is 'async'}}
185
185
_ = a.effPropT
@@ -189,8 +189,8 @@ func someAsyncFunc() async {
189
189
_ = a.effPropAT
190
190
191
191
// (mostly) corrected ones
192
-
_ =await a.effPropA // expected-warning {{cannot use property 'effPropA' with a non-sendable type 'Box' across actors}}
193
-
_ =try!await a.effPropT // expected-warning {{cannot use property 'effPropT' with a non-sendable type 'Box' across actors}}
192
+
_ =await a.effPropA // expected-warning {{non-sendable type 'Box' in asynchronous access to actor-isolated property 'effPropA' cannot cross actor boundary}}
193
+
_ =try!await a.effPropT // expected-warning {{non-sendable type 'Box' in implicitly asynchronous access to actor-isolated property 'effPropT' cannot cross actor boundary}}
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
292
+
// expected-warning@-1{{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
293
293
awaitwisk(1)
294
-
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
294
+
// expected-warning@-1{{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
295
295
await(peelBanana)()
296
296
await(((((peelBanana)))))()
297
297
await(((wisk)))((wisk)((wisk)(1)))
298
-
// expected-warning@-1 3{{cannot pass argument of non-sendable type 'Any' across actors}}
298
+
// expected-warning@-1 3{{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
299
299
300
300
blender((peelBanana))
301
301
// expected-error@-1{{converting function value of type '@BananaActor () -> ()' to '() -> Void' loses global actor 'BananaActor'}}
302
302
awaitwisk(peelBanana)
303
-
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
303
+
// expected-warning@-1{{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
304
304
305
305
awaitwisk(wisk)
306
-
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
306
+
// expected-warning@-1{{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
307
307
await(((wisk)))(((wisk)))
308
-
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
308
+
// expected-warning@-1{{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
309
309
310
-
// expected-warning@+1 {{cannot pass argument of non-sendable type 'Any' across actors}}
310
+
// expected-warning@+1 {{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
311
311
await{wisk}()(1)
312
312
313
-
// expected-warning@+1 {{cannot pass argument of non-sendable type 'Any' across actors}}
313
+
// expected-warning@+1 {{non-sendable type 'Any' passed in call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
314
314
await(true? wisk :{n inreturn})(1)
315
315
}
316
316
@@ -358,23 +358,23 @@ actor Calculator {
358
358
359
359
@OrangeActorfunc doSomething()async{
360
360
let _ =(awaitbananaAdd(1))(2)
361
-
// expected-warning@-1{{cannot call function returning non-sendable type}}
361
+
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
362
362
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
363
363
let _ =await(awaitbananaAdd(1))(2) // expected-warning{{no 'async' operations occur within 'await' expression}}
364
-
// expected-warning@-1{{cannot call function returning non-sendable type}}
364
+
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
365
365
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
366
366
367
367
letcalc=Calculator()
368
368
369
369
let _ =(await calc.addCurried(1))(2)
370
-
// expected-warning@-1{{cannot call function returning non-sendable type}}
370
+
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by implicitly asynchronous call to actor-isolated instance method 'addCurried' cannot cross actor boundary}}
371
371
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
372
372
let _ =await(await calc.addCurried(1))(2) // expected-warning{{no 'async' operations occur within 'await' expression}}
373
-
// expected-warning@-1{{cannot call function returning non-sendable type}}
373
+
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by implicitly asynchronous call to actor-isolated instance method 'addCurried' cannot cross actor boundary}}
374
374
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
// expected-warning@-1{{cannot call function returning non-sendable type}}
377
+
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by implicitly asynchronous call to actor-isolated instance method 'addCurried' cannot cross actor boundary}}
378
378
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
_ =actor.c // expected-error{{expression is 'async' but is not marked with 'await'}}
874
874
// expected-note@-1{{property access is 'async'}}
875
-
// expected-warning@-2{{cannot use property 'c' with a non-sendable type 'SomeClass' across actors}}
876
-
_ =awaitactor.c // expected-warning{{cannot use property 'c' with a non-sendable type 'SomeClass' across actors}}
875
+
// expected-warning@-2{{non-sendable type 'SomeClass' in implicitly asynchronous access to actor-isolated property 'c' cannot cross actor boundary}}
876
+
_ =awaitactor.c // expected-warning{{non-sendable type 'SomeClass' in implicitly asynchronous access to actor-isolated property 'c' cannot cross actor boundary}}
0 commit comments