Files
swift-mirror/test/Concurrency/Inputs/NonStrictModule.swift
Becca Royal-Gordon ecdd42f20c Make @preconcurrency import hide sendable variance
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.
2022-04-08 13:08:39 -07:00

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)
}