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
// expected-warning@-1{{cannot pass argument of non-concurrent-value type 'Any' across actors}}
180
+
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
181
181
awaitwisk(1)
182
-
// expected-warning@-1{{cannot pass argument of non-concurrent-value type 'Any' across actors}}
182
+
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
183
183
await(peelBanana)()
184
184
await(((((peelBanana)))))()
185
185
await(((wisk)))((wisk)((wisk)(1)))
186
-
// expected-warning@-1 3{{cannot pass argument of non-concurrent-value type 'Any' across actors}}
186
+
// expected-warning@-1 3{{cannot pass argument of non-sendable type 'Any' across actors}}
187
187
188
188
blender((peelBanana)) // expected-error {{global function 'peelBanana()' isolated to global actor 'BananaActor' can not be referenced from different global actor 'OrangeActor'}}
189
189
awaitwisk(peelBanana) // expected-error {{global function 'peelBanana()' isolated to global actor 'BananaActor' can not be referenced from different global actor 'OrangeActor'}}
190
-
// expected-warning@-1{{cannot pass argument of non-concurrent-value type 'Any' across actors}}
190
+
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
191
191
192
192
awaitwisk(wisk) // expected-error {{global function 'wisk' isolated to global actor 'BananaActor' can not be referenced from different global actor 'OrangeActor'}}
193
-
// expected-warning@-1{{cannot pass argument of non-concurrent-value type 'Any' across actors}}
193
+
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
194
194
await(((wisk)))(((wisk))) // expected-error {{global function 'wisk' isolated to global actor 'BananaActor' can not be referenced from different global actor 'OrangeActor'}}
195
-
// expected-warning@-1{{cannot pass argument of non-concurrent-value type 'Any' across actors}}
195
+
// expected-warning@-1{{cannot pass argument of non-sendable type 'Any' across actors}}
196
196
197
197
// expected-warning@+2 {{no 'async' operations occur within 'await' expression}}
198
198
// expected-error@+1 {{global function 'wisk' isolated to global actor 'BananaActor' can not be referenced from different global actor 'OrangeActor'}}
@@ -240,18 +240,18 @@ actor Calculator {
240
240
241
241
@OrangeActorfunc doSomething()async{
242
242
let _ =(awaitbananaAdd(1))(2)
243
-
// expected-warning@-1{{cannot call function returning non-concurrent-value type}}
243
+
// expected-warning@-1{{cannot call function returning non-sendable type}}
244
244
let _ =await(awaitbananaAdd(1))(2) // expected-warning{{no 'async' operations occur within 'await' expression}}
245
-
// expected-warning@-1{{cannot call function returning non-concurrent-value type}}
245
+
// expected-warning@-1{{cannot call function returning non-sendable type}}
246
246
247
247
letcalc=Calculator()
248
248
249
249
let _ =(await calc.addCurried(1))(2)
250
-
// expected-warning@-1{{cannot call function returning non-concurrent-value type}}
250
+
// expected-warning@-1{{cannot call function returning non-sendable type}}
251
251
let _ =await(await calc.addCurried(1))(2) // expected-warning{{no 'async' operations occur within 'await' expression}}
252
-
// expected-warning@-1{{cannot call function returning non-concurrent-value type}}
252
+
// expected-warning@-1{{cannot call function returning non-sendable type}}
act.text[0]+="hello" // expected-error{{actor-isolated property 'text' can only be mutated from inside the actor}}
92
92
93
-
_ = act.point // expected-warning{{cannot use property 'point' with a non-concurrent-value type 'Point' across actors}}
93
+
_ = act.point // expected-warning{{cannot use property 'point' with a non-sendable type 'Point' across actors}}
94
94
}
95
95
96
96
extensionMyActor{
@@ -659,11 +659,11 @@ class SomeClassWithInits {
659
659
func hasDetached(){
660
660
Task.runDetached{
661
661
// okay
662
-
awaitself.isolated() // expected-warning{{cannot use parameter 'self' with a non-concurrent-value type 'SomeClassWithInits' from concurrently-executed code}}
663
-
self.isolated() // expected-warning{{cannot use parameter 'self' with a non-concurrent-value type 'SomeClassWithInits' from concurrently-executed code}}
662
+
awaitself.isolated() // expected-warning{{cannot use parameter 'self' with a non-sendable type 'SomeClassWithInits' from concurrently-executed code}}
663
+
self.isolated() // expected-warning{{cannot use parameter 'self' with a non-sendable type 'SomeClassWithInits' from concurrently-executed code}}
664
664
// expected-error@-1{{call is 'async' but is not marked with 'await'}}
665
665
666
-
print(awaitself.mutableState) // expected-warning{{cannot use parameter 'self' with a non-concurrent-value type 'SomeClassWithInits' from concurrently-executed code}}
666
+
print(awaitself.mutableState) // expected-warning{{cannot use parameter 'self' with a non-sendable type 'SomeClassWithInits' from concurrently-executed code}}
varnc:NotConcurrent // expected-error{{stored property 'nc' of 'Sendable'-conforming struct 'S1' has non-concurrent-value type 'NotConcurrent'}}
194
+
varnc:NotConcurrent // expected-error{{stored property 'nc' of 'Sendable'-conforming struct 'S1' has non-sendable type 'NotConcurrent'}}
195
195
}
196
196
197
197
structS2<T>:Sendable{
198
-
varnc:T // expected-error{{stored property 'nc' of 'Sendable'-conforming generic struct 'S2' has non-concurrent-value type 'T'}}
198
+
varnc:T // expected-error{{stored property 'nc' of 'Sendable'-conforming generic struct 'S2' has non-sendable type 'T'}}
199
199
}
200
200
201
201
structS3<T>{
@@ -206,7 +206,7 @@ struct S3<T> {
206
206
extensionS3:Sendablewhere T:Sendable{}
207
207
208
208
enumE1:Sendable{
209
-
case payload(NotConcurrent) // expected-error{{associated value 'payload' of 'Sendable'-conforming enum 'E1' has non-concurrent-value type 'NotConcurrent'}}
209
+
case payload(NotConcurrent) // expected-error{{associated value 'payload' of 'Sendable'-conforming enum 'E1' has non-sendable type 'NotConcurrent'}}
210
210
}
211
211
212
212
enumE2<T>{
@@ -216,7 +216,7 @@ enum E2<T> {
216
216
extensionE2:Sendablewhere T:Sendable{}
217
217
218
218
finalclassC1:Sendable{
219
-
letnc:NotConcurrent?=nil // expected-error{{stored property 'nc' of 'Sendable'-conforming class 'C1' has non-concurrent-value type 'NotConcurrent?'}}
219
+
letnc:NotConcurrent?=nil // expected-error{{stored property 'nc' of 'Sendable'-conforming class 'C1' has non-sendable type 'NotConcurrent?'}}
220
220
varx:Int=0 // expected-error{{stored property 'x' of 'Sendable'-conforming class 'C1' is mutable}}
221
221
leti:Int=0
222
222
}
@@ -227,11 +227,11 @@ final class C2: Sendable {
227
227
228
228
classC3{}
229
229
230
-
classC4:C3,UnsafeSendable{
230
+
classC4:C3,UnsafeSendable{ // expected-warning{{'UnsafeSendable' is deprecated: Use @unchecked Sendable instead}}
231
231
vary:Int=0 // okay
232
232
}
233
233
234
-
classC5:UnsafeSendable{
234
+
classC5:UnsafeSendable{ // expected-warning{{'UnsafeSendable' is deprecated: Use @unchecked Sendable instead}}
235
235
varx:Int=0 // okay
236
236
}
237
237
@@ -246,15 +246,15 @@ class C9: Sendable { } // expected-error{{non-final class 'C9' cannot conform to
0 commit comments