mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
6 lines
498 B
Swift
6 lines
498 B
Swift
struct Foo {
|
|
static let member = Bar() // expected-complete-warning {{static property 'member' is not concurrency-safe because non-'Sendable' type 'Bar' may have shared mutable state; this is an error in the Swift 6 language mode}}
|
|
// expected-complete-note@-1 {{annotate 'member' with '@MainActor' if property should only be accessed from the main actor}}
|
|
// expected-complete-note@-2{{disable concurrency-safety checks if accesses are protected by an external synchronization mechanism}}
|
|
}
|