mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Tests: Make Constraints/result_builder.swift compatible with back deployment.
Resolves rdar://159025996.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user