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
Copy file name to clipboardExpand all lines: test/ClangImporter/objc_async.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -322,12 +322,12 @@ func check() async {
322
322
_ =awaitBarFrame()
323
323
_ =awaitFooFrame()
324
324
_ =awaitBazFrame()
325
-
// expected-warning@-1 {{non-sendable type 'BazFrame' returned by implicitly async call to global actor 'SomeGlobalActor'-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode}}
325
+
// expected-warning@-1 {{non-sendable result type 'BazFrame' cannot be sent from global actor 'SomeGlobalActor'-isolated context in call to initializer 'init()'; this is an error in the Swift 6 language mode}}
326
326
327
327
_ =awaitBarFrame(size:0)
328
328
_ =awaitFooFrame(size:0)
329
329
_ =awaitBazFrame(size:0)
330
-
// expected-warning@-1 {{non-sendable type 'BazFrame' returned by implicitly async call to global actor 'SomeGlobalActor'-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode}}
330
+
// expected-warning@-1 {{non-sendable result type 'BazFrame' cannot be sent from global actor 'SomeGlobalActor'-isolated context in call to initializer 'init(size:)'; this is an error in the Swift 6 language mode}}
// effectful properties from outside the actor instance
178
178
179
-
// expected-warning@+2 {{non-sendable type 'Box' in asynchronous access to actor-isolated property 'effPropA' cannot cross actor boundary}}
179
+
// expected-warning@+2 {{non-sendable type 'Box' of property 'effPropA' cannot exit actor-isolated context}}
180
180
// expected-error@+1{{expression is 'async' but is not marked with 'await'}} {{7-7=await }} expected-note@+1{{property access is 'async'}}
181
181
_ = a.effPropA
182
182
183
-
// expected-warning@+3 {{non-sendable type 'Box' in implicitly asynchronous access to actor-isolated property 'effPropT' cannot cross actor boundary}}
183
+
// expected-warning@+3 {{non-sendable type 'Box' of property 'effPropT' cannot exit actor-isolated context}}
184
184
// expected-error@+2{{property access can throw, but it is not marked with 'try' and the error is not handled}}
185
185
// expected-error@+1{{expression is 'async' but is not marked with 'await'}} {{7-7=await }} expected-note@+1{{property access is 'async'}}
186
186
_ = a.effPropT
@@ -190,8 +190,8 @@ func someAsyncFunc() async {
190
190
_ = a.effPropAT
191
191
192
192
// (mostly) corrected ones
193
-
_ =await a.effPropA // expected-warning {{non-sendable type 'Box' in asynchronous access to actor-isolated property 'effPropA' cannot cross actor boundary}}
194
-
_ =try!await a.effPropT // expected-warning {{non-sendable type 'Box' in implicitly asynchronous access to actor-isolated property 'effPropT' cannot cross actor boundary}}
193
+
_ =await a.effPropA // expected-warning {{non-sendable type 'Box' of property 'effPropA' cannot exit actor-isolated context}}
194
+
_ =try!await a.effPropT // expected-warning {{non-sendable type 'Box' of property 'effPropT' cannot exit actor-isolated context}}
195
195
_ =try?await a.effPropAT
196
196
197
197
print("ok!")
@@ -353,23 +353,23 @@ actor Calculator {
353
353
354
354
@OrangeActorfunc doSomething()async{
355
355
let _ =(awaitbananaAdd(1))(2)
356
-
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by implicitly async call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
356
+
// expected-warning@-1{{non-sendable result type '(Int) -> Int' cannot be sent from global actor 'BananaActor'-isolated context in call to global function 'bananaAdd'}}
357
357
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
358
358
let _ =await(awaitbananaAdd(1))(2) // expected-warning{{no 'async' operations occur within 'await' expression}}
359
-
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by implicitly async call to global actor 'BananaActor'-isolated function cannot cross actor boundary}}
359
+
// expected-warning@-1{{non-sendable result type '(Int) -> Int' cannot be sent from global actor 'BananaActor'-isolated context in call to global function 'bananaAdd'}}
360
360
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
361
361
362
362
letcalc=Calculator()
363
363
364
364
let _ =(await calc.addCurried(1))(2)
365
-
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by implicitly async call to actor-isolated function cannot cross actor boundary}}
365
+
// expected-warning@-1{{non-sendable result type '(Int) -> Int' cannot be sent from actor-isolated context in call to instance method 'addCurried'}}
366
366
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
367
367
let _ =await(await calc.addCurried(1))(2) // expected-warning{{no 'async' operations occur within 'await' expression}}
368
-
// expected-warning@-1{{non-sendable type '(Int) -> Int' returned by implicitly async call to actor-isolated function cannot cross actor boundary}}
368
+
// expected-warning@-1{{non-sendable result type '(Int) -> Int' cannot be sent from actor-isolated context in call to instance method 'addCurried'}}
369
369
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
Copy file name to clipboardExpand all lines: test/Concurrency/actor_inout_isolation.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ extension TestActor {
119
119
func passStateIntoDifferentClassMethod()async{
120
120
letother=NonAsyncClass()
121
121
letotherCurry= other.modifyOtherAsync
122
-
// expected-targeted-complete-tns-warning @-1 {{non-sendable type 'NonAsyncClass' exiting actor-isolated context in call to nonisolated instance method 'modifyOtherAsync' cannot cross actor boundary}}
122
+
// expected-targeted-complete-tns-warning @-1 {{non-sendable type 'NonAsyncClass' cannot exit actor-isolated context in call to nonisolated instance method 'modifyOtherAsync'}}
123
123
await other.modifyOtherAsync(&value2)
124
124
// expected-error @-1 {{actor-isolated property 'value2' cannot be passed 'inout' to 'async' function call}}
125
125
@@ -288,11 +288,11 @@ actor ProtectArray {
288
288
func test()async{
289
289
// FIXME: this is invalid too!
290
290
_ =await array.mutateAsynchronously
291
-
// expected-targeted-complete-tns-warning@-1 {{non-sendable type '@lvalue [Int]' exiting actor-isolated context in call to nonisolated property 'mutateAsynchronously' cannot cross actor boundary}}
291
+
// expected-targeted-complete-tns-warning@-1 {{non-sendable type '@lvalue [Int]' cannot exit actor-isolated context in call to nonisolated property 'mutateAsynchronously'}}
292
292
293
293
_ =awaitarray[mutateAsynchronously:0]
294
294
// expected-error@-1 {{actor-isolated property 'array' cannot be passed 'inout' to 'async' function call}}
295
-
// expected-targeted-complete-tns-warning@-2 {{non-sendable type 'inout Array<Int>' exiting actor-isolated context in call to nonisolated subscript 'subscript(mutateAsynchronously:)' cannot cross actor boundary}}
295
+
// expected-targeted-complete-tns-warning@-2 {{non-sendable type 'inout Array<Int>' cannot exit actor-isolated context in call to nonisolated subscript 'subscript(mutateAsynchronously:)'}}
0 commit comments