Files
swift-mirror/test/Constraints/result_builder_opaque_result_structural.swift
Holly Borla 9196c9ad41 [FrontendOptions] Enable structural opaque result types and remove
the -enable-experimental-structural-opaque-types frontend flag.
2021-11-30 15:41:23 -08:00

22 lines
388 B
Swift

// RUN: %target-typecheck-verify-swift -disable-availability-checking
@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
}
}