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
classC1{} // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}}
9
13
classC2{}
10
14
@@ -74,6 +78,7 @@ func f() {
74
78
print(TestStatics.immutableExplicitSendable)
75
79
print(TestStatics.immutableInferredSendable)
76
80
print(TestStatics.mutable) // expected-error{{reference to static property 'mutable' is not concurrency-safe because it involves shared mutable state}}
81
+
print(Globals.actorInteger) // expected-error{{main actor-isolated static property 'actorInteger' can not be referenced from global actor 'TestGlobalActor'}}
func testCGlobals(){ // expected-note{{add '@MainActor' to make global function 'testCGlobals()' part of global actor 'MainActor'}}
94
+
let _ =Globals.integerConstant
95
+
let _ =Globals.integerMutable // expected-warning{{reference to static property 'integerMutable' is not concurrency-safe because it involves shared mutable state}}
96
+
let _ =Globals.nonisolatedUnsafeIntegerConstant
97
+
let _ =Globals.nonisolatedUnsafeIntegerMutable
98
+
let _ =Globals.actorInteger // expected-error{{main actor-isolated static property 'actorInteger' can not be referenced from a non-isolated context}}
0 commit comments