Skip to content

Commit 36a20a5

Browse files
authored
Merge pull request #71165 from nate-chandler/test/20240125/1
[Test] Add new expected warnings.
2 parents 390d510 + 92a495b commit 36a20a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/Concurrency/concurrent_value_checking.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,15 +350,15 @@ struct SomeActor {
350350
class 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

0 commit comments

Comments
 (0)