File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1697,7 +1697,7 @@ func perform(_ p: some P) {
16971697 p.perform ()
16981698}
16991699
1700- @MainActor class C : P { ... }
1700+ @MainActor class C : @MainActor P { ... }
17011701
17021702Task { @MainActor in
17031703 let c = C ()
@@ -1753,7 +1753,7 @@ the dynamic cast will only succeed
17531753when ` performIfP ` is called from the main actor:
17541754
17551755``` swift
1756- @MainActor class C : P {
1756+ @MainActor class C : @MainActor P {
17571757 func perform () {
17581758 print (" C.perform" )
17591759 }
@@ -1812,7 +1812,7 @@ Swift prohibits using an isolated conformance
18121812when the type is also required to conform to ` Sendable ` :
18131813
18141814``` swift
1815- @MainActor class C : P { ... }
1815+ @MainActor class C : @MainActor P { ... }
18161816
18171817let c = C ()
18181818performConcurrently (c) // Error
@@ -1885,7 +1885,7 @@ Swift will prevent calling `createParallel`
18851885with a type that has an isolated conformance to ` P ` :
18861886
18871887``` swift
1888- @MainActor class C : P {
1888+ @MainActor class C : @MainActor P {
18891889 static func perform () { /* use main actor state */ }
18901890}
18911891
You can’t perform that action at this time.
0 commit comments