From 83a6c1a618085deb28f23b1f99c4fe7987eee0a7 Mon Sep 17 00:00:00 2001 From: Allan Shortlidge Date: Tue, 26 Aug 2025 15:27:56 -0700 Subject: [PATCH] Tests: Make Constraints/result_builder.swift compatible with back deployment. Resolves rdar://159025996. --- test/Constraints/result_builder.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/Constraints/result_builder.swift b/test/Constraints/result_builder.swift index b7a63a80a29..3a7a7c2e433 100644 --- a/test/Constraints/result_builder.swift +++ b/test/Constraints/result_builder.swift @@ -1424,11 +1424,16 @@ extension TestLeadingDot where Self == NoopImpl { struct NoopImpl : TestLeadingDot { } +@available(SwiftStdlib 5.1, *) func testLeadingDotSyntax(v: Int) { let x: some TestLeadingDot = .test { 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