@@ -12,20 +12,20 @@ func messageNoAsync() { }
1212@available ( * , noasync, renamed: " asyncReplacement() " )
1313func renamedNoAsync( _ completion: @escaping ( Int ) -> Void ) -> Void { }
1414
15- @available ( macOS 11 , * )
15+ @available ( macOS 11 , iOS 13 , watchOS 6 , * )
1616func asyncReplacement( ) async -> Int { }
1717
1818@available ( * , noasync, renamed: " IOActor.readString() " )
1919func readStringFromIO( ) -> String { }
2020
21- @available ( macOS 11 , * )
21+ @available ( macOS 11 , iOS 13 , watchOS 6 , * )
2222actor IOActor {
2323 func readString( ) -> String {
2424 return readStringFromIO ( )
2525 }
2626}
2727
28- @available ( macOS 11 , * )
28+ @available ( macOS 11 , iOS 13 , watchOS 6 , * )
2929func asyncFunc( ) async {
3030 // expected-error@+1{{global function 'basicNoAsync' is unavailable from asynchronous contexts}}
3131 basicNoAsync ( )
@@ -40,11 +40,13 @@ func asyncFunc() async {
4040 let _ = readStringFromIO ( )
4141}
4242
43- // expected-error@+2{{asynchronous global function 'unavailableAsyncFunc()' must be available from asynchronous contexts}}
43+ // expected-error@+3{{asynchronous global function 'unavailableAsyncFunc()' must be available from asynchronous contexts}}
44+ @available ( macOS 11 , iOS 13 , watchOS 6 , * )
4445@available ( * , noasync)
4546func unavailableAsyncFunc( ) async {
4647}
4748
49+ @available ( macOS 11 , iOS 13 , watchOS 6 , * )
4850protocol BadSyncable {
4951 // expected-error@+2{{asynchronous property 'isSyncd' must be available from asynchronous contexts}}
5052 @available ( * , noasync)
0 commit comments