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/ClangImporter/objc_isolation_complete.swift
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,3 +31,16 @@ class IsolatedSub: NXSender {
31
31
return mainActorState
32
32
}
33
33
}
34
+
35
+
@objc
36
+
@MainActor
37
+
classTest:NSObject{
38
+
staticvarshared:Test? // expected-note {{mutation of this static property is only permitted within the actor}}
39
+
40
+
overrideinit(){
41
+
super.init()
42
+
43
+
Self.shared =self
44
+
// expected-warning@-1 {{main actor-isolated static property 'shared' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode}}
0 commit comments