mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The diagnostic for non-Sendable globa/static `let` properties was checking for a Sendable conformance without considering `@preconcurrency`. Emit this diagnostic via a `@preconcurrency`-sensitive path. Fixes rdar://121889248.
14 lines
296 B
Swift
14 lines
296 B
Swift
public struct StrictStruct: Hashable {
|
|
public init() {}
|
|
}
|
|
|
|
open class StrictClass {
|
|
open func send(_ body: @Sendable () -> Void) {}
|
|
open func dontSend(_ body: () -> Void) {}
|
|
}
|
|
|
|
public protocol StrictProtocol {
|
|
func send(_ body: @Sendable () -> Void)
|
|
func dontSend(_ body: () -> Void)
|
|
}
|