Skip to content

Commit 83a6c1a

Browse files
committed
Tests: Make Constraints/result_builder.swift compatible with back deployment.
Resolves rdar://159025996.
1 parent 6918a63 commit 83a6c1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/Constraints/result_builder.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,11 +1424,16 @@ extension TestLeadingDot where Self == NoopImpl {
14241424
struct NoopImpl : TestLeadingDot {
14251425
}
14261426

1427+
@available(SwiftStdlib 5.1, *)
14271428
func testLeadingDotSyntax(v: Int) {
14281429
let x: some TestLeadingDot = .test {
14291430
v
14301431
}
14311432
}
14321433

1433-
testLeadingDotSyntax(v: -42)
1434+
if #available(SwiftStdlib 5.1, *) {
1435+
testLeadingDotSyntax(v: -42)
1436+
} else {
1437+
print("buildBlock: -42") // Fallback for the back deployment bots
1438+
}
14341439
// CHECK: buildBlock: -42

0 commit comments

Comments
 (0)