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 @@ -350,15 +350,15 @@ struct SomeActor {
350350class NotSendable { }
351351
352352// actor-isolated mutable properties are valid
353- final class C10 : Sendable {
353+ final class C10 : Sendable { // expected-warning{{default initializer for 'C10' cannot be both nonisolated and main actor-isolated}}
354354 @MainActor var x = 0
355- @MainActor var ns1 : NotSendable ?
355+ @MainActor var ns1 : NotSendable ? // expected-note{{initializer for property 'ns1' is main actor-isolated}}
356356 @MainActor let ns : NotSendable ? = nil
357357}
358358
359- final class C14 : Sendable {
359+ final class C14 : Sendable { // expected-warning{{default initializer for 'C14' cannot be both nonisolated and global actor 'SomeActor'-isolated}}
360360 @SomeActor var y = 1
361- @SomeActor var nc = NotConcurrent ( )
361+ @SomeActor var nc = NotConcurrent ( ) // expected-note{{initializer for property 'nc' is global actor 'SomeActor'-isolated}}
362362 @SomeActor let nc1 = NotConcurrent ( )
363363}
364364
You can’t perform that action at this time.
0 commit comments