Skip to content

Commit d1fe263

Browse files
committed
[test] Mark availability on failing validation-tests
The validation-test suite was incorrectly being run without the concurrency feature enabled, so the tests were disabled. Now that they're running, they need fixed availability annotations.
1 parent 6f4b798 commit d1fe263

File tree

6 files changed

+12
-1
lines changed

6 files changed

+12
-1
lines changed

validation-test/compiler_crashers_2_fixed/rdar70144083.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// REQUIRES: concurrency
44

5+
@available(SwiftStdlib 5.5, *)
56
public protocol AsyncIteratorProtocol {
67
associatedtype Element
78
associatedtype Failure: Error
@@ -10,6 +11,7 @@ public protocol AsyncIteratorProtocol {
1011
mutating func cancel()
1112
}
1213

14+
@available(SwiftStdlib 5.5, *)
1315
public protocol AsyncSequence {
1416
associatedtype Element
1517
associatedtype Failure: Error
@@ -18,6 +20,7 @@ public protocol AsyncSequence {
1820
func makeAsyncIterator() -> AsyncIterator
1921
}
2022

23+
@available(SwiftStdlib 5.5, *)
2124
struct Just<Element>: AsyncSequence {
2225
typealias Failure = Never
2326

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %target-swift-frontend %s -emit-ir -enable-library-evolution -enable-experimental-concurrency
22
// REQUIRES: concurrency
33

4+
@available(SwiftStdlib 5.5, *)
45
public class X {
56
public func f() async { }
67
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %target-swift-frontend %s -emit-ir -enable-library-evolution -enable-experimental-concurrency
22
// REQUIRES: concurrency
33

4+
@available(SwiftStdlib 5.5, *)
45
public protocol P {
56
func f() async
67
}

validation-test/compiler_crashers_2_fixed/rdar71816041.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// RUN: %target-swift-frontend -emit-ir -primary-file %s -enable-experimental-concurrency
22
// REQUIRES: concurrency
33

4+
@available(SwiftStdlib 5.5, *)
45
func getIntAndString() async -> (Int, String) { (5, "1") }
56

7+
@available(SwiftStdlib 5.5, *)
68
func testDecompose() async -> Int {
79
async let (i, s) = await getIntAndString()
810
return await i
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
// RUN: %target-swift-frontend %s -emit-ir -enable-experimental-concurrency
22
// REQUIRES: concurrency
33

4+
@available(SwiftStdlib 5.5, *)
45
protocol P {
56
func f<T>() async throws -> T?
67
}
8+
@available(SwiftStdlib 5.5, *)
79
extension P {
810
func f<T>() async throws -> T? { nil }
911
}
12+
@available(SwiftStdlib 5.5, *)
1013
class X: P {}
1114

validation-test/compiler_crashers_2_fixed/sr15248.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-swift-frontend -emit-ir %s
22
// REQUIRES: concurrency
3+
34
private struct TransformResult<T> {
45
var index: Int
56
var transformedElement: T
@@ -11,7 +12,7 @@ private struct TransformResult<T> {
1112
}
1213

1314
public extension Collection {
14-
@available(macOS 12.0.0, *)
15+
@available(SwiftStdlib 5.5, *)
1516
private func f<T>(_ transform: @escaping (Element) async throws -> T) async throws -> [T] {
1617
return try await withThrowingTaskGroup(of: TransformResult<T>.self) { group in
1718
return []

0 commit comments

Comments
 (0)