Skip to content

Commit 025ee1e

Browse files
authored
Merge pull request swiftlang#41979 from etcwilde/ewilde/fix-availability-annotations
Use SwiftStdlib availability
2 parents d858ac3 + 504a52a commit 025ee1e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/attr/attr_availability_noasync.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ func messageNoAsync() { }
1212
@available(*, noasync, renamed: "asyncReplacement()")
1313
func renamedNoAsync(_ completion: @escaping (Int) -> Void) -> Void { }
1414

15-
@available(macOS 11, iOS 13, watchOS 6, *)
15+
@available(SwiftStdlib 5.5, *)
1616
func asyncReplacement() async -> Int { }
1717

1818
@available(*, noasync, renamed: "IOActor.readString()")
1919
func readStringFromIO() -> String {}
2020

21-
@available(macOS 11, iOS 13, watchOS 6, *)
21+
@available(SwiftStdlib 5.5, *)
2222
actor IOActor {
2323
func readString() -> String {
2424
return readStringFromIO()
2525
}
2626
}
2727

28-
@available(macOS 11, iOS 13, watchOS 6, *)
28+
@available(SwiftStdlib 5.5, *)
2929
func asyncFunc() async {
3030
// expected-error@+1{{global function 'basicNoAsync' is unavailable from asynchronous contexts}}
3131
basicNoAsync()
@@ -41,12 +41,12 @@ func asyncFunc() async {
4141
}
4242

4343
// expected-error@+3{{asynchronous global function 'unavailableAsyncFunc()' must be available from asynchronous contexts}}
44-
@available(macOS 11, iOS 13, watchOS 6, *)
44+
@available(SwiftStdlib 5.5, *)
4545
@available(*, noasync)
4646
func unavailableAsyncFunc() async {
4747
}
4848

49-
@available(macOS 11, iOS 13, watchOS 6, *)
49+
@available(SwiftStdlib 5.5, *)
5050
protocol BadSyncable {
5151
// expected-error@+2{{asynchronous property 'isSyncd' must be available from asynchronous contexts}}
5252
@available(*, noasync)

0 commit comments

Comments
 (0)