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
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -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