Tests: Make Constraints/result_builder.swift compatible with back deployment.

Resolves rdar://159025996.
This commit is contained in:
Allan Shortlidge
2025-08-26 15:27:56 -07:00
parent 6918a63efb
commit 83a6c1a618

View File

@@ -1424,11 +1424,16 @@ extension TestLeadingDot where Self == NoopImpl {
struct NoopImpl : TestLeadingDot { struct NoopImpl : TestLeadingDot {
} }
@available(SwiftStdlib 5.1, *)
func testLeadingDotSyntax(v: Int) { func testLeadingDotSyntax(v: Int) {
let x: some TestLeadingDot = .test { let x: some TestLeadingDot = .test {
v v
} }
} }
testLeadingDotSyntax(v: -42) if #available(SwiftStdlib 5.1, *) {
testLeadingDotSyntax(v: -42)
} else {
print("buildBlock: -42") // Fallback for the back deployment bots
}
// CHECK: buildBlock: -42 // CHECK: buildBlock: -42