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
classNonAsyncClass{ // expected-targeted-complete-note {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
105
-
// expected-targeted-complete-sns-note @-1 {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
106
-
// expected-sns-note @-2 {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
105
+
// expected-targeted-complete-tns-note @-1 {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
106
+
// expected-tns-note @-2 {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
107
107
func modifyOtherAsync(_ other :inoutInt)async{
108
108
// ...
109
109
}
@@ -121,7 +121,7 @@ extension TestActor {
121
121
func passStateIntoDifferentClassMethod()async{
122
122
letother=NonAsyncClass()
123
123
letotherCurry= other.modifyOtherAsync
124
-
// expected-targeted-complete-sns-warning @-1 {{non-sendable type 'NonAsyncClass' exiting actor-isolated context in call to non-isolated instance method 'modifyOtherAsync' cannot cross actor boundary}}
124
+
// expected-targeted-complete-tns-warning @-1 {{non-sendable type 'NonAsyncClass' exiting actor-isolated context in call to non-isolated instance method 'modifyOtherAsync' cannot cross actor boundary}}
125
125
await other.modifyOtherAsync(&value2)
126
126
// expected-error @-1 {{actor-isolated property 'value2' cannot be passed 'inout' to 'async' function call}}
127
127
// expected-targeted-complete-warning @-2 {{passing argument of non-sendable type 'NonAsyncClass' outside of actor-isolated context may introduce data races}}
@@ -217,22 +217,22 @@ struct MyGlobalActor {
217
217
// expected-note @-1 {{var declared here}}
218
218
// expected-note @-2 {{var declared here}}
219
219
// expected-note @-3 {{mutation of this var is only permitted within the actor}}
220
-
// expected-complete-sns-error @-4 {{top-level code variables cannot have a global actor}}
221
-
// expected-complete-sns-note @-5 4{{mutation of this var is only permitted within the actor}}
220
+
// expected-complete-tns-error @-4 {{top-level code variables cannot have a global actor}}
221
+
// expected-complete-tns-note @-5 4{{mutation of this var is only permitted within the actor}}
222
222
223
223
224
224
if #available(SwiftStdlib 5.1,*){
225
225
let _ =Task.detached{await{(_ foo:inoutInt)asyncin foo +=1}(&number)}
226
226
// expected-error @-1 {{actor-isolated var 'number' cannot be passed 'inout' to 'async' function call}}
227
227
// expected-minimal-targeted-error @-2 {{global actor 'MyGlobalActor'-isolated var 'number' can not be used 'inout' from a non-isolated context}}
228
-
// expected-complete-sns-error @-3 {{main actor-isolated var 'number' can not be used 'inout' from a non-isolated context}}
228
+
// expected-complete-tns-error @-3 {{main actor-isolated var 'number' can not be used 'inout' from a non-isolated context}}
229
229
}
230
230
231
231
// attempt to pass global state owned by the global actor to another async function
// expected-complete-sns-error @-1 {{main actor-isolated var 'number' can not be used 'inout' from global actor 'MyGlobalActor'}}
251
+
// expected-complete-tns-error @-1 {{main actor-isolated var 'number' can not be used 'inout' from global actor 'MyGlobalActor'}}
252
252
253
253
// Gently unwrap things that are fine
254
254
@available(SwiftStdlib 5.1,*)
@@ -293,11 +293,11 @@ actor ProtectArray {
293
293
func test()async{
294
294
// FIXME: this is invalid too!
295
295
_ =await array.mutateAsynchronously
296
-
// expected-targeted-complete-sns-warning@-1 {{non-sendable type '@lvalue [Int]' exiting actor-isolated context in call to non-isolated property 'mutateAsynchronously' cannot cross actor boundary}}
296
+
// expected-targeted-complete-tns-warning@-1 {{non-sendable type '@lvalue [Int]' exiting actor-isolated context in call to non-isolated property 'mutateAsynchronously' cannot cross actor boundary}}
297
297
298
298
_ =awaitarray[mutateAsynchronously:0]
299
299
// expected-error@-1 {{actor-isolated property 'array' cannot be passed 'inout' to 'async' function call}}
300
-
// expected-targeted-complete-sns-warning@-2 {{non-sendable type 'inout Array<Int>' exiting actor-isolated context in call to non-isolated subscript 'subscript(mutateAsynchronously:)' cannot cross actor boundary}}
300
+
// expected-targeted-complete-tns-warning@-2 {{non-sendable type 'inout Array<Int>' exiting actor-isolated context in call to non-isolated subscript 'subscript(mutateAsynchronously:)' cannot cross actor boundary}}
0 commit comments