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 opaque types, instead of disabling availability checking.
22 lines
394 B
Swift
22 lines
394 B
Swift
// RUN: %target-typecheck-verify-swift -target %target-swift-5.1-abi-triple
|
|
|
|
@resultBuilder
|
|
struct TupleBuilder {
|
|
static func buildBlock<T1, T2>(_ t1: T1, _ t2: T2) -> (T1, T2) {
|
|
return (t1, t2)
|
|
}
|
|
}
|
|
|
|
protocol Tupled {
|
|
associatedtype TupleType
|
|
|
|
@TupleBuilder var tuple: TupleType { get }
|
|
}
|
|
|
|
struct TupleMeStructural: Tupled {
|
|
var tuple: (some Any, Int) {
|
|
"hello"
|
|
0
|
|
}
|
|
}
|