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/Concurrency/global_actor_inference.swift
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ actor GenericSub<T> : GenericSuper<[T]> {
153
153
overridefunc method(){} // expected-note 2{{calls to instance method 'method()' from outside of its actor context are implicitly asynchronous}}
154
154
155
155
@GenericGlobalActor<T>overridefunc method2(){} // expected-error{{global actor 'GenericGlobalActor<T>'-isolated instance method 'method2()' has different actor isolation from global actor 'GenericGlobalActor<[T]>'-isolated overridden declaration}}
156
-
@actorIndependentoverridefunc method3(){} // expected-error{{actor-independent instance method 'method3()' has different actor isolation from global actor 'GenericGlobalActor<[T]>'-isolated overridden declaration}}
156
+
nonisolatedoverridefunc method3(){} // expected-error{{actor-independent instance method 'method3()' has different actor isolation from global actor 'GenericGlobalActor<[T]>'-isolated overridden declaration}}
157
157
158
158
@OtherGlobalActorfunc testMethod(){
159
159
method() // expected-error{{instance method 'method()' isolated to global actor 'GenericGlobalActor<[T]>' can not be referenced from different global actor 'OtherGlobalActor'}}
@@ -243,7 +243,7 @@ func barSync() {
243
243
structWrapperOnActor<Wrapped>{
244
244
@actorIndependent(unsafe)privatevarstored:Wrapped
245
245
246
-
@actorIndependentinit(wrappedValue:Wrapped){
246
+
nonisolatedinit(wrappedValue:Wrapped){
247
247
stored = wrappedValue
248
248
}
249
249
@@ -266,12 +266,12 @@ actor WrapperActor<Wrapped> {
266
266
storage = wrappedValue
267
267
}
268
268
269
-
@actorIndependentvarwrappedValue:Wrapped{
269
+
nonisolatedvarwrappedValue:Wrapped{
270
270
get{ storage }
271
271
set{ storage = newValue }
272
272
}
273
273
274
-
@actorIndependentvarprojectedValue:Wrapped{
274
+
nonisolatedvarprojectedValue:Wrapped{
275
275
get{ storage }
276
276
set{ storage = newValue }
277
277
}
@@ -311,7 +311,7 @@ actor WrapperActorBad1<Wrapped> {
311
311
storage = wrappedValue
312
312
}
313
313
314
-
varwrappedValue:Wrapped{ // expected-error{{'wrappedValue' property in property wrapper type 'WrapperActorBad1' cannot be isolated to the actor instance; consider @actorIndependent}}}}
314
+
varwrappedValue:Wrapped{ // expected-error{{'wrappedValue' property in property wrapper type 'WrapperActorBad1' cannot be isolated to the actor instance; consider 'nonisolated'}}}}
315
315
get{ storage }
316
316
set{ storage = newValue }
317
317
}
@@ -325,12 +325,12 @@ actor WrapperActorBad2<Wrapped> {
325
325
storage = wrappedValue
326
326
}
327
327
328
-
@actorIndependentvarwrappedValue:Wrapped{
328
+
nonisolatedvarwrappedValue:Wrapped{
329
329
get{ storage }
330
330
set{ storage = newValue }
331
331
}
332
332
333
-
varprojectedValue:Wrapped{ // expected-error{{'projectedValue' property in property wrapper type 'WrapperActorBad2' cannot be isolated to the actor instance; consider @actorIndependent}}
333
+
varprojectedValue:Wrapped{ // expected-error{{'projectedValue' property in property wrapper type 'WrapperActorBad2' cannot be isolated to the actor instance; consider 'nonisolated'}}
0 commit comments