mirror of
https://github.com/apple/swift.git
synced 2026-01-07 22:52:31 +01:00
When the conformance checker and override checker detect a difference in a function type’s @Sendable attribute that varies in an illegal way, they now check if the protocol/base class was imported with an @preconcurrency import, and either limit the diagnostic or suggest adding @preconcurrency to the import as appropriate. Completes rdar://91109455.
12 lines
276 B
Swift
12 lines
276 B
Swift
public struct NonStrictStruct { }
|
|
|
|
open class NonStrictClass {
|
|
open func send(_ body: @Sendable () -> Void) {}
|
|
open func dontSend(_ body: () -> Void) {}
|
|
}
|
|
|
|
public protocol NonStrictProtocol {
|
|
func send(_ body: @Sendable () -> Void)
|
|
func dontSend(_ body: () -> Void)
|
|
}
|