@@ -7,7 +7,7 @@ func test1(asyncfp : () async -> Int, fp : () -> Int) async {
77 _ = await asyncfp ( ) + asyncfp( )
88 _ = await asyncfp ( ) + fp( )
99 _ = await fp ( ) + 42 // expected-warning {{no calls to 'async' functions occur within 'await' expression}}
10- _ = asyncfp ( ) // expected-error {{call is 'async' but is not marked with 'await'}}
10+ _ = asyncfp ( ) // expected-error {{call is 'async' but is not marked with 'await'}}{{7-7=await }}
1111}
1212
1313func getInt( ) async -> Int { return 5 }
@@ -49,13 +49,13 @@ struct HasAsyncBad {
4949}
5050
5151func testAutoclosure( ) async {
52- await acceptAutoclosureAsync ( getInt ( ) ) // expected-error{{call is 'async' in an autoclosure argument that is not marked with 'await'}}
52+ await acceptAutoclosureAsync ( getInt ( ) ) // expected-error{{call is 'async' in an autoclosure argument that is not marked with 'await'}}{{32-32=await }}
5353 await acceptAutoclosureNonAsync ( getInt ( ) ) // expected-error{{'async' in an autoclosure that does not support concurrency}}
5454
5555 await acceptAutoclosureAsync ( await getInt ( ) )
5656 await acceptAutoclosureNonAsync ( await getInt ( ) ) // expected-error{{'async' in an autoclosure that does not support concurrency}}
5757
58- await acceptAutoclosureAsync ( getInt ( ) ) // expected-error{{call is 'async' in an autoclosure argument that is not marked with 'await'}}
58+ await acceptAutoclosureAsync ( getInt ( ) ) // expected-error{{call is 'async' in an autoclosure argument that is not marked with 'await'}}{{32-32=await }}
5959 await acceptAutoclosureNonAsync ( getInt ( ) ) // expected-error{{'async' in an autoclosure that does not support concurrency}}
6060}
6161
@@ -93,7 +93,7 @@ func testThrowingAndAsync() async throws {
9393 // expected-note@-1{{did you mean to use 'try'?}}
9494 // expected-note@-2{{did you mean to handle error as optional value?}}
9595 // expected-note@-3{{did you mean to disable error propagation?}}
96- _ = try throwingAndAsync ( ) // expected-error{{call is 'async' but is not marked with 'await'}}
96+ _ = try throwingAndAsync ( ) // expected-error{{call is 'async' but is not marked with 'await'}}{{11-11=await }}
9797}
9898
9999func testExhaustiveDoCatch( ) async {
0 commit comments