mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When a retroactive conformance to a protocol that inherits from `Sendable` introduces an implicit `Sendable` conformance, allow `@preconcurrency` to suppress the diagnostic about the `Sendable` conformance being introduced outside of the original source file. Fixes rdar://125080066.
18 lines
404 B
Swift
18 lines
404 B
Swift
public struct NonStrictStruct { }
|
|
|
|
open class NonStrictClass {
|
|
public init() {}
|
|
open func send(_ body: @Sendable () -> Void) {}
|
|
open func dontSend(_ body: () -> Void) {}
|
|
}
|
|
|
|
public protocol NonStrictProtocol {
|
|
func send(_ body: @Sendable () -> Void)
|
|
func dontSend(_ body: () -> Void)
|
|
}
|
|
|
|
open class NonStrictClass2 { }
|
|
open class NonStrictClass3 { }
|
|
|
|
public protocol MySendableProto: Sendable {}
|