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
+2-1
Original file line number
Diff line number
Diff line change
@@ -415,12 +415,13 @@ actor WrapperActorBad2<Wrapped: Sendable> {
415
415
structWrapperWithMainActorDefaultInit{
416
416
varwrappedValue:Int{fatalError()}
417
417
418
-
@MainActorinit(){} // expected-note {{calls to initializer 'init()' from outside of its actor context are implicitly asynchronous}}
418
+
@MainActorinit(){} // expected-note 2 {{calls to initializer 'init()' from outside of its actor context are implicitly asynchronous}}
419
419
}
420
420
421
421
actorActorWithWrapper{
422
422
@WrapperOnActorvarsynced:Int=0
423
423
// expected-note@-1 3{{property declared here}}
424
+
@WrapperWithMainActorDefaultInitvarproperty:Int // expected-error {{call to main actor-isolated initializer 'init()' in a synchronous actor-isolated context}}
424
425
func f(){
425
426
_ = synced // expected-error{{main actor-isolated property 'synced' can not be referenced on a different actor instance}}
426
427
_ = $synced // expected-error{{global actor 'SomeGlobalActor'-isolated property '$synced' can not be referenced on a different actor instance}}
0 commit comments