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
func useFooInADefer()->String{ // expected-note {{calls to global function 'useFooInADefer()' from outside of its actor context are implicitly asynchronous}}
@MainActorvarx=useFooInADefer() // expected-warning {{expression requiring global actor 'MainActor' cannot appear in default-value expression of property 'x'; this is an error in Swift 6}}
591
+
@MainActorvary={()->Boolin
592
+
varz= statefulThingy // expected-warning {{expression requiring global actor 'MainActor' cannot appear in default-value expression of property 'y'; this is an error in Swift 6}}
593
+
return z
594
+
}()
595
+
}
596
+
597
+
@SomeGlobalActor
598
+
classButter{
599
+
vara=useFooInADefer() // expected-error {{call to main actor-isolated global function 'useFooInADefer()' in a synchronous global actor 'SomeGlobalActor'-isolated context}}
600
+
601
+
nonisolatedletb= statefulThingy // expected-error {{var 'statefulThingy' isolated to global actor 'MainActor' can not be referenced from a non-isolated synchronous context}}
602
+
603
+
varc:Int={
604
+
returngetGlobal7() // expected-warning {{expression requiring global actor 'SomeGlobalActor' cannot appear in default-value expression of property 'c'; this is an error in Swift 6}}
0 commit comments