@@ -7,7 +7,7 @@ func test1(asyncfp : () async -> Int, fp : () -> Int) async {
7
7
_ = await asyncfp ( ) + asyncfp( )
8
8
_ = await asyncfp ( ) + fp( )
9
9
_ = 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 }}
11
11
}
12
12
13
13
func getInt( ) async -> Int { return 5 }
@@ -49,13 +49,13 @@ struct HasAsyncBad {
49
49
}
50
50
51
51
func 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 }}
53
53
await acceptAutoclosureNonAsync ( getInt ( ) ) // expected-error{{'async' in an autoclosure that does not support concurrency}}
54
54
55
55
await acceptAutoclosureAsync ( await getInt ( ) )
56
56
await acceptAutoclosureNonAsync ( await getInt ( ) ) // expected-error{{'async' in an autoclosure that does not support concurrency}}
57
57
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 }}
59
59
await acceptAutoclosureNonAsync ( getInt ( ) ) // expected-error{{'async' in an autoclosure that does not support concurrency}}
60
60
}
61
61
@@ -93,7 +93,7 @@ func testThrowingAndAsync() async throws {
93
93
// expected-note@-1{{did you mean to use 'try'?}}
94
94
// expected-note@-2{{did you mean to handle error as optional value?}}
95
95
// 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 }}
97
97
}
98
98
99
99
func testExhaustiveDoCatch( ) async {
0 commit comments