Skip to content

Commit fcf6750

Browse files
committed
Fix availability, should be SwiftStdlib 5.5 for all Task APIs
1 parent 726007e commit fcf6750

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

test/Concurrency/Runtime/async_let_throws.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func boom() throws -> Int {
1414
throw Boom()
1515
}
1616

17-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
17+
@available(SwiftStdlib 5.5, *)
1818
func test() async {
1919
async let result = boom()
2020

@@ -25,7 +25,7 @@ func test() async {
2525
}
2626
}
2727

28-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
28+
@available(SwiftStdlib 5.5, *)
2929
@main struct Main {
3030
static func main() async {
3131
await test()

test/Concurrency/Runtime/async_task_async_let_child_cancel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// REQUIRES: rdar_77671328
1111

12-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
12+
@available(SwiftStdlib 5.5, *)
1313
func printWaitPrint(_ int: Int) async -> Int {
1414
print("start, cancelled:\(Task.isCancelled), id:\(int)")
1515
while !Task.isCancelled {
@@ -19,7 +19,7 @@ func printWaitPrint(_ int: Int) async -> Int {
1919
return int
2020
}
2121

22-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
22+
@available(SwiftStdlib 5.5, *)
2323
func test() async {
2424
let h = detach {
2525
await printWaitPrint(0)
@@ -70,7 +70,7 @@ func test() async {
7070
print("exit")
7171
}
7272

73-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
73+
@available(SwiftStdlib 5.5, *)
7474
@main struct Main {
7575
static func main() async {
7676
await test()

test/Concurrency/Runtime/async_task_locals_basic.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func printTaskLocalAsync<V>(
5454
printTaskLocal(key, expected, file: file, line: line)
5555
}
5656

57-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
57+
@available(SwiftStdlib 5.5, *)
5858
@discardableResult
5959
func printTaskLocal<V>(
6060
_ key: TaskLocal<V>,
@@ -156,7 +156,7 @@ func nested_3_onlyTopContributes() async {
156156
printTaskLocal(TL.$string) // CHECK-NEXT: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
157157
}
158158

159-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
159+
@available(SwiftStdlib 5.5, *)
160160
func nested_3_onlyTopContributesAsync() async {
161161
await printTaskLocalAsync(TL.$string) // CHECK: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
162162
await TL.$string.withValue("one") {
@@ -173,7 +173,7 @@ func nested_3_onlyTopContributesAsync() async {
173173
await printTaskLocalAsync(TL.$string) // CHECK-NEXT: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
174174
}
175175

176-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
176+
@available(SwiftStdlib 5.5, *)
177177
func nested_3_onlyTopContributesMixed() async {
178178
await printTaskLocalAsync(TL.$string) // CHECK: TaskLocal<String>(defaultValue: <undefined>) (<undefined>)
179179
await TL.$string.withValue("one") {

test/Concurrency/Runtime/async_task_locals_copy_to_async.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// UNSUPPORTED: use_os_stdlib
99
// UNSUPPORTED: back_deployment_runtime
1010

11-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
11+
@available(SwiftStdlib 5.5, *)
1212
enum TL {
1313
@TaskLocal
1414
static var number: Int = 0
1515
@TaskLocal
1616
static var other: Int = 0
1717
}
1818

19-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
19+
@available(SwiftStdlib 5.5, *)
2020
@discardableResult
2121
func printTaskLocal<V>(
2222
_ key: TaskLocal<V>,
@@ -34,7 +34,7 @@ func printTaskLocal<V>(
3434

3535
// ==== ------------------------------------------------------------------------
3636

37-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
37+
@available(SwiftStdlib 5.5, *)
3838
func copyTo_async() async {
3939
await TL.$number.withValue(1111) {
4040
printTaskLocal(TL.$number) // CHECK: TaskLocal<Int>(defaultValue: 0) (1111)
@@ -58,7 +58,7 @@ func copyTo_async() async {
5858
}
5959
}
6060

61-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
61+
@available(SwiftStdlib 5.5, *)
6262
func copyTo_async_noWait() async {
6363
print(#function)
6464
TL.$number.withValue(1111) {
@@ -80,7 +80,7 @@ func copyTo_async_noWait() async {
8080
await Task.sleep(2 * second)
8181
}
8282

83-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
83+
@available(SwiftStdlib 5.5, *)
8484
@main struct Main {
8585
static func main() async {
8686
await copyTo_async()

0 commit comments

Comments
 (0)