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
[flow-isolation] Allow for initialization of fields of a Global Actor isolated class in its nonisolated inits
This just involved loosening some checks in the type checker so we stopped
erroring in the type checker and instead deferred to SIL level checks.
rdar://131136194
// Make sure inference of @MainActor on wrappedValue doesn't crash.
338
338
339
-
// expected-note@+1 {{mutation of this property is only permitted within the actor}}
340
339
publicvarwrappedValue:Wrapped
341
340
342
341
publicvaraccessCount:Int
343
342
344
343
nonisolatedpublicinit(wrappedValue:Wrapped){
345
-
// expected-warning@+1 {{main actor-isolated property 'wrappedValue' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode}}
0 commit comments