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 {
350
350
class NotSendable { }
351
351
352
352
// 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}}
354
354
@MainActor var x = 0
355
- @MainActor var ns1 : NotSendable ?
355
+ @MainActor var ns1 : NotSendable ? // expected-note{{initializer for property 'ns1' is main actor-isolated}}
356
356
@MainActor let ns : NotSendable ? = nil
357
357
}
358
358
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}}
360
360
@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}}
362
362
@SomeActor let nc1 = NotConcurrent ( )
363
363
}
364
364
You can’t perform that action at this time.
0 commit comments