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
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -32,15 +32,27 @@ class IsolatedSub: NXSender {
32
32
}
33
33
}
34
34
35
+
classNotSendable{}
36
+
37
+
@MainActor
38
+
classNSObjectInitOverride:NSObject{
39
+
varns:NotSendable
40
+
41
+
overrideinit(){
42
+
self.ns =NotSendable()
43
+
super.init()
44
+
}
45
+
}
46
+
47
+
35
48
@objc
36
49
@MainActor
37
50
classTest:NSObject{
38
-
staticvarshared:Test? // expected-note {{mutation of this static property is only permitted within the actor}}
51
+
staticvarshared:Test?
39
52
40
53
overrideinit(){
41
54
super.init()
42
55
43
56
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