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.
35 lines
696 B
Swift
35 lines
696 B
Swift
// RUN: %target-swift-emit-silgen %s -target %target-swift-5.1-abi-triple
|
|
|
|
protocol P {}
|
|
class C {
|
|
init(x: some P) {}
|
|
|
|
convenience init(y: any P) { self.init(x: y) }
|
|
}
|
|
|
|
enum E {
|
|
init(p: some P, throwing: ()) throws {}
|
|
init(p: some P, async: ()) async {}
|
|
init?(p: some P, failable: ()) {}
|
|
|
|
init(p: any P, withTry: ()) throws {
|
|
try self.init(p: p, throwing: ())
|
|
}
|
|
|
|
init(p: any P, withForceTry: ()) {
|
|
try! self.init(p: p, throwing: ())
|
|
}
|
|
|
|
init(p: any P, withAwait: ()) async {
|
|
await self.init(p: p, async: ())
|
|
}
|
|
|
|
init?(p: any P, withFailable: ()) {
|
|
self.init(p: p, failable: ())
|
|
}
|
|
|
|
init(p: any P, withForce: ()) {
|
|
self.init(p: p, failable: ())!
|
|
}
|
|
}
|