Files
swift-mirror/test/Constraints/result_builder_opaque_result_structural.swift
Allan Shortlidge 6f55aa4170 Tests: Remove -disable-availability-checking in tests that use opaque types.
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.
2024-10-19 19:39:18 -07:00

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