mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Use the `%target-swift-5.1-abi-triple` substitution to compile the tests for deployment to the minimum OS versions required for use of _Concurrency APIs, instead of disabling availability checking.
24 lines
545 B
Swift
24 lines
545 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-module -emit-module-path %t/P.swiftmodule -parse-as-library -module-name P -DP %s
|
|
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -I%t -parse-as-library -module-name Q -c %s -o /dev/null -validate-tbd-against-ir=missing
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
#if P
|
|
public protocol P {
|
|
func f() async
|
|
}
|
|
#else
|
|
import P
|
|
|
|
protocol Q: P { }
|
|
|
|
extension Q {
|
|
public func f() async { }
|
|
}
|
|
|
|
public struct S: Q {
|
|
public init() { }
|
|
}
|
|
#endif
|