@@ -21,7 +21,7 @@ func simple(completion: (String) -> Void) { }
21
21
// ASYNC-SIMPLE-EMPTY:
22
22
// ASYNC-SIMPLE-NEXT: basic.swift [[# @LINE-4]]:43 -> [[# @LINE-4]]:46
23
23
// ASYNC-SIMPLE-NEXT: {
24
- // ASYNC-SIMPLE-NEXT: async {
24
+ // ASYNC-SIMPLE-NEXT: Task {
25
25
// ASYNC-SIMPLE-NEXT: let result = await simple()
26
26
// ASYNC-SIMPLE-NEXT: completion(result)
27
27
// ASYNC-SIMPLE-NEXT: }
@@ -37,7 +37,7 @@ func simple(completion: (String) -> Void) { }
37
37
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-SIMPLENOLABEL %s
38
38
func simpleWithoutLabel( _ completion: ( String ) -> Void ) { }
39
39
// ASYNC-SIMPLENOLABEL: {
40
- // ASYNC-SIMPLENOLABEL-NEXT: async {
40
+ // ASYNC-SIMPLENOLABEL-NEXT: Task {
41
41
// ASYNC-SIMPLENOLABEL-NEXT: let result = await simpleWithoutLabel()
42
42
// ASYNC-SIMPLENOLABEL-NEXT: completion(result)
43
43
// ASYNC-SIMPLENOLABEL-NEXT: }
@@ -47,7 +47,7 @@ func simpleWithoutLabel(_ completion: (String) -> Void) { }
47
47
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-SIMPLEWITHARG %s
48
48
func simpleWithArg( a: Int , completion: ( String ) -> Void ) { }
49
49
// ASYNC-SIMPLEWITHARG: {
50
- // ASYNC-SIMPLEWITHARG-NEXT: async {
50
+ // ASYNC-SIMPLEWITHARG-NEXT: Task {
51
51
// ASYNC-SIMPLEWITHARG-NEXT: let result = await simpleWithArg(a: a)
52
52
// ASYNC-SIMPLEWITHARG-NEXT: completion(result)
53
53
// ASYNC-SIMPLEWITHARG-NEXT: }
@@ -57,7 +57,7 @@ func simpleWithArg(a: Int, completion: (String) -> Void) { }
57
57
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-MULTIPLERESULTS %s
58
58
func multipleResults( completion: ( String , Int ) -> Void ) { }
59
59
// ASYNC-MULTIPLERESULTS: {
60
- // ASYNC-MULTIPLERESULTS-NEXT: async {
60
+ // ASYNC-MULTIPLERESULTS-NEXT: Task {
61
61
// ASYNC-MULTIPLERESULTS-NEXT: let result = await multipleResults()
62
62
// ASYNC-MULTIPLERESULTS-NEXT: completion(result.0, result.1)
63
63
// ASYNC-MULTIPLERESULTS-NEXT: }
@@ -67,7 +67,7 @@ func multipleResults(completion: (String, Int) -> Void) { }
67
67
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-NONOPTIONALERROR %s
68
68
func nonOptionalError( completion: ( String , Error ) -> Void ) { }
69
69
// ASYNC-NONOPTIONALERROR: {
70
- // ASYNC-NONOPTIONALERROR-NEXT: async {
70
+ // ASYNC-NONOPTIONALERROR-NEXT: Task {
71
71
// ASYNC-NONOPTIONALERROR-NEXT: let result = await nonOptionalError()
72
72
// ASYNC-NONOPTIONALERROR-NEXT: completion(result.0, result.1)
73
73
// ASYNC-NONOPTIONALERROR-NEXT: }
@@ -77,7 +77,7 @@ func nonOptionalError(completion: (String, Error) -> Void) { }
77
77
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-NOPARAMS %s
78
78
func noParams( completion: ( ) -> Void ) { }
79
79
// ASYNC-NOPARAMS: {
80
- // ASYNC-NOPARAMS-NEXT: async {
80
+ // ASYNC-NOPARAMS-NEXT: Task {
81
81
// ASYNC-NOPARAMS-NEXT: await noParams()
82
82
// ASYNC-NOPARAMS-NEXT: completion()
83
83
// ASYNC-NOPARAMS-NEXT: }
@@ -87,7 +87,7 @@ func noParams(completion: () -> Void) { }
87
87
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-ERROR %s
88
88
func error( completion: ( String ? , Error ? ) -> Void ) { }
89
89
// ASYNC-ERROR: {
90
- // ASYNC-ERROR-NEXT: async {
90
+ // ASYNC-ERROR-NEXT: Task {
91
91
// ASYNC-ERROR-NEXT: do {
92
92
// ASYNC-ERROR-NEXT: let result = try await error()
93
93
// ASYNC-ERROR-NEXT: completion(result, nil)
@@ -100,7 +100,7 @@ func error(completion: (String?, Error?) -> Void) { }
100
100
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-ERRORONLY %s
101
101
func errorOnly( completion: ( Error ? ) -> Void ) { }
102
102
// ASYNC-ERRORONLY: {
103
- // ASYNC-ERRORONLY-NEXT: async {
103
+ // ASYNC-ERRORONLY-NEXT: Task {
104
104
// ASYNC-ERRORONLY-NEXT: do {
105
105
// ASYNC-ERRORONLY-NEXT: try await errorOnly()
106
106
// ASYNC-ERRORONLY-NEXT: completion(nil)
@@ -114,7 +114,7 @@ func errorOnly(completion: (Error?) -> Void) { }
114
114
// RUN: %refactor -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-ERRORNONOPTIONALRESULT %s
115
115
func errorNonOptionalResult( completion: ( String , Error ? ) -> Void ) { }
116
116
// ASYNC-ERRORNONOPTIONALRESULT: {
117
- // ASYNC-ERRORNONOPTIONALRESULT-NEXT: async {
117
+ // ASYNC-ERRORNONOPTIONALRESULT-NEXT: Task {
118
118
// ASYNC-ERRORNONOPTIONALRESULT-NEXT: do {
119
119
// ASYNC-ERRORNONOPTIONALRESULT-NEXT: let result = try await errorNonOptionalResult()
120
120
// ASYNC-ERRORNONOPTIONALRESULT-NEXT: completion(result, nil)
@@ -128,7 +128,7 @@ func errorNonOptionalResult(completion: (String, Error?) -> Void) { }
128
128
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-CUSTOMERROR %s
129
129
func customError( completion: ( String ? , CustomError ? ) -> Void ) { }
130
130
// ASYNC-CUSTOMERROR: {
131
- // ASYNC-CUSTOMERROR-NEXT: async {
131
+ // ASYNC-CUSTOMERROR-NEXT: Task {
132
132
// ASYNC-CUSTOMERROR-NEXT: do {
133
133
// ASYNC-CUSTOMERROR-NEXT: let result = try await customError()
134
134
// ASYNC-CUSTOMERROR-NEXT: completion(result, nil)
@@ -142,7 +142,7 @@ func customError(completion: (String?, CustomError?) -> Void) { }
142
142
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-ALIAS %s
143
143
func alias( completion: SomeCallback ) { }
144
144
// ASYNC-ALIAS: {
145
- // ASYNC-ALIAS-NEXT: async {
145
+ // ASYNC-ALIAS-NEXT: Task {
146
146
// ASYNC-ALIAS-NEXT: let result = await alias()
147
147
// ASYNC-ALIAS-NEXT: completion(result)
148
148
// ASYNC-ALIAS-NEXT: }
@@ -152,7 +152,7 @@ func alias(completion: SomeCallback) { }
152
152
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-NESTEDALIAS %s
153
153
func nestedAlias( completion: NestedAliasCallback ) { }
154
154
// ASYNC-NESTEDALIAS: {
155
- // ASYNC-NESTEDALIAS-NEXT: async {
155
+ // ASYNC-NESTEDALIAS-NEXT: Task {
156
156
// ASYNC-NESTEDALIAS-NEXT: let result = await nestedAlias()
157
157
// ASYNC-NESTEDALIAS-NEXT: completion(result)
158
158
// ASYNC-NESTEDALIAS-NEXT: }
@@ -162,7 +162,7 @@ func nestedAlias(completion: NestedAliasCallback) { }
162
162
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-SIMPLERESULT %s
163
163
func simpleResult( completion: ( Result < String , Never > ) -> Void ) { }
164
164
// ASYNC-SIMPLERESULT: {
165
- // ASYNC-SIMPLERESULT-NEXT: async {
165
+ // ASYNC-SIMPLERESULT-NEXT: Task {
166
166
// ASYNC-SIMPLERESULT-NEXT: let result = await simpleResult()
167
167
// ASYNC-SIMPLERESULT-NEXT: completion(.success(result))
168
168
// ASYNC-SIMPLERESULT-NEXT: }
@@ -172,7 +172,7 @@ func simpleResult(completion: (Result<String, Never>) -> Void) { }
172
172
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-ERRORRESULT %s
173
173
func errorResult( completion: ( Result < String , Error > ) -> Void ) { }
174
174
// ASYNC-ERRORRESULT: {
175
- // ASYNC-ERRORRESULT-NEXT: async {
175
+ // ASYNC-ERRORRESULT-NEXT: Task {
176
176
// ASYNC-ERRORRESULT-NEXT: do {
177
177
// ASYNC-ERRORRESULT-NEXT: let result = try await errorResult()
178
178
// ASYNC-ERRORRESULT-NEXT: completion(.success(result))
@@ -186,7 +186,7 @@ func errorResult(completion: (Result<String, Error>) -> Void) { }
186
186
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-CUSTOMERRORRESULT %s
187
187
func customErrorResult( completion: ( Result < String , CustomError > ) -> Void ) { }
188
188
// ASYNC-CUSTOMERRORRESULT: {
189
- // ASYNC-CUSTOMERRORRESULT-NEXT: async {
189
+ // ASYNC-CUSTOMERRORRESULT-NEXT: Task {
190
190
// ASYNC-CUSTOMERRORRESULT-NEXT: do {
191
191
// ASYNC-CUSTOMERRORRESULT-NEXT: let result = try await customErrorResult()
192
192
// ASYNC-CUSTOMERRORRESULT-NEXT: completion(.success(result))
@@ -200,7 +200,7 @@ func customErrorResult(completion: (Result<String, CustomError>) -> Void) { }
200
200
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=ASYNC-ALIASRESULT %s
201
201
func aliasedResult( completion: SomeResultCallback ) { }
202
202
// ASYNC-ALIASRESULT: {
203
- // ASYNC-ALIASRESULT-NEXT: async {
203
+ // ASYNC-ALIASRESULT-NEXT: Task {
204
204
// ASYNC-ALIASRESULT-NEXT: do {
205
205
// ASYNC-ALIASRESULT-NEXT: let result = try await aliasedResult()
206
206
// ASYNC-ALIASRESULT-NEXT: completion(.success(result))
@@ -214,7 +214,7 @@ func aliasedResult(completion: SomeResultCallback) { }
214
214
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=MANY %s
215
215
func many( _ completion: ( String , Int ) -> Void ) { }
216
216
// MANY: {
217
- // MANY-NEXT: async {
217
+ // MANY-NEXT: Task {
218
218
// MANY-NEXT: let result = await many()
219
219
// MANY-NEXT: completion(result.0, result.1)
220
220
// MANY-NEXT: }
@@ -224,7 +224,7 @@ func many(_ completion: (String, Int) -> Void) { }
224
224
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=OPTIONAL-SINGLE %s
225
225
func optionalSingle( completion: ( String ? ) -> Void ) { }
226
226
// OPTIONAL-SINGLE: {
227
- // OPTIONAL-SINGLE-NEXT: async {
227
+ // OPTIONAL-SINGLE-NEXT: Task {
228
228
// OPTIONAL-SINGLE-NEXT: let result = await optionalSingle()
229
229
// OPTIONAL-SINGLE-NEXT: completion(result)
230
230
// OPTIONAL-SINGLE-NEXT: }
@@ -234,7 +234,7 @@ func optionalSingle(completion: (String?) -> Void) { }
234
234
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=MANY-OPTIONAL %s
235
235
func manyOptional( _ completion: ( String ? , Int ? ) -> Void ) { }
236
236
// MANY-OPTIONAL: {
237
- // MANY-OPTIONAL-NEXT: async {
237
+ // MANY-OPTIONAL-NEXT: Task {
238
238
// MANY-OPTIONAL-NEXT: let result = await manyOptional()
239
239
// MANY-OPTIONAL-NEXT: completion(result.0, result.1)
240
240
// MANY-OPTIONAL-NEXT: }
@@ -244,7 +244,7 @@ func manyOptional(_ completion: (String?, Int?) -> Void) { }
244
244
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=MIXED %s
245
245
func mixed( _ completion: ( String ? , Int ) -> Void ) { }
246
246
// MIXED: {
247
- // MIXED-NEXT: async {
247
+ // MIXED-NEXT: Task {
248
248
// MIXED-NEXT: let result = await mixed()
249
249
// MIXED-NEXT: completion(result.0, result.1)
250
250
// MIXED-NEXT: }
@@ -254,7 +254,7 @@ func mixed(_ completion: (String?, Int) -> Void) { }
254
254
// RUN: %refactor -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1
255
255
func mixedOptionalError( _ completion: ( String ? , Int , Error ? ) -> Void ) { }
256
256
// MIXED-OPTIONAL-ERROR: {
257
- // MIXED-OPTIONAL-ERROR-NEXT: async {
257
+ // MIXED-OPTIONAL-ERROR-NEXT: Task {
258
258
// MIXED-OPTIONAL-ERROR-NEXT: do {
259
259
// MIXED-OPTIONAL-ERROR-NEXT: let result = try await mixedOptionalError()
260
260
// MIXED-OPTIONAL-ERROR-NEXT: completion(result.0, result.1, nil)
@@ -268,7 +268,7 @@ func mixedOptionalError(_ completion: (String?, Int, Error?) -> Void) { }
268
268
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=MIXED-ERROR %s
269
269
func mixedError( _ completion: ( String ? , Int , Error ) -> Void ) { }
270
270
// MIXED-ERROR: {
271
- // MIXED-ERROR-NEXT: async {
271
+ // MIXED-ERROR-NEXT: Task {
272
272
// MIXED-ERROR-NEXT: let result = await mixedError()
273
273
// MIXED-ERROR-NEXT: completion(result.0, result.1, result.2)
274
274
// MIXED-ERROR-NEXT: }
@@ -278,7 +278,7 @@ func mixedError(_ completion: (String?, Int, Error) -> Void) { }
278
278
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=GENERIC %s
279
279
func generic< T, R> ( completion: ( T , R ) -> Void ) { }
280
280
// GENERIC: {
281
- // GENERIC-NEXT: async {
281
+ // GENERIC-NEXT: Task {
282
282
// GENERIC-NEXT: let result: (T, R) = await generic()
283
283
// GENERIC-NEXT: completion(result.0, result.1)
284
284
// GENERIC-NEXT: }
@@ -288,7 +288,7 @@ func generic<T, R>(completion: (T, R) -> Void) { }
288
288
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=GENERIC-RESULT %s
289
289
func genericResult< T> ( completion: ( T ? , Error ? ) -> Void ) where T: Numeric { }
290
290
// GENERIC-RESULT: {
291
- // GENERIC-RESULT-NEXT: async {
291
+ // GENERIC-RESULT-NEXT: Task {
292
292
// GENERIC-RESULT-NEXT: do {
293
293
// GENERIC-RESULT-NEXT: let result: T = try await genericResult()
294
294
// GENERIC-RESULT-NEXT: completion(result, nil)
@@ -303,7 +303,7 @@ func genericResult<T>(completion: (T?, Error?) -> Void) where T: Numeric { }
303
303
// RUN: %refactor -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=GENERIC-ERROR %s
304
304
func genericError< E> ( completion: ( String ? , E ? ) -> Void ) where E: Error { }
305
305
// GENERIC-ERROR: {
306
- // GENERIC-ERROR-NEXT: async {
306
+ // GENERIC-ERROR-NEXT: Task {
307
307
// GENERIC-ERROR-NEXT: do {
308
308
// GENERIC-ERROR-NEXT: let result: String = try await genericError()
309
309
// GENERIC-ERROR-NEXT: completion(result, nil)
@@ -317,7 +317,7 @@ func genericError<E>(completion: (String?, E?) -> Void) where E: Error { }
317
317
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=OTHER-NAME %s
318
318
func otherName( execute: ( String ) -> Void ) { }
319
319
// OTHER-NAME: {
320
- // OTHER-NAME-NEXT: async {
320
+ // OTHER-NAME-NEXT: Task {
321
321
// OTHER-NAME-NEXT: let result = await otherName()
322
322
// OTHER-NAME-NEXT: execute(result)
323
323
// OTHER-NAME-NEXT: }
@@ -327,7 +327,7 @@ func otherName(execute: (String) -> Void) { }
327
327
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=DEFAULT_ARGS %s
328
328
func defaultArgs( a: Int , b: Int = 10 , completion: ( String ) -> Void ) { }
329
329
// DEFAULT_ARGS: {
330
- // DEFAULT_ARGS-NEXT: async {
330
+ // DEFAULT_ARGS-NEXT: Task {
331
331
// DEFAULT_ARGS-NEXT: let result = await defaultArgs(a: a, b: b)
332
332
// DEFAULT_ARGS-NEXT: completion(result)
333
333
// DEFAULT_ARGS-NEXT: }
@@ -419,7 +419,7 @@ func cConvention(completion: @convention(c) () -> Void) { }
419
419
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix VOID-HANDLER %s
420
420
func voidCompletion( completion: ( Void ) -> Void ) { }
421
421
// VOID-HANDLER: {
422
- // VOID-HANDLER-NEXT: async {
422
+ // VOID-HANDLER-NEXT: Task {
423
423
// VOID-HANDLER-NEXT: await voidCompletion()
424
424
// VOID-HANDLER-NEXT: completion(())
425
425
// VOID-HANDLER-NEXT: }
@@ -429,7 +429,7 @@ func voidCompletion(completion: (Void) -> Void) {}
429
429
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix OPT-VOID-AND-ERROR-HANDLER %s
430
430
func optVoidAndErrorCompletion( completion: ( Void ? , Error ? ) -> Void ) { }
431
431
// OPT-VOID-AND-ERROR-HANDLER: {
432
- // OPT-VOID-AND-ERROR-HANDLER-NEXT: async {
432
+ // OPT-VOID-AND-ERROR-HANDLER-NEXT: Task {
433
433
// OPT-VOID-AND-ERROR-HANDLER-NEXT: do {
434
434
// OPT-VOID-AND-ERROR-HANDLER-NEXT: try await optVoidAndErrorCompletion()
435
435
// OPT-VOID-AND-ERROR-HANDLER-NEXT: completion((), nil)
@@ -443,7 +443,7 @@ func optVoidAndErrorCompletion(completion: (Void?, Error?) -> Void) {}
443
443
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix TOO-MUCH-VOID-AND-ERROR-HANDLER %s
444
444
func tooMuchVoidAndErrorCompletion( completion: ( Void ? , Void ? , Error ? ) -> Void ) { }
445
445
// TOO-MUCH-VOID-AND-ERROR-HANDLER: {
446
- // TOO-MUCH-VOID-AND-ERROR-HANDLER-NEXT: async {
446
+ // TOO-MUCH-VOID-AND-ERROR-HANDLER-NEXT: Task {
447
447
// TOO-MUCH-VOID-AND-ERROR-HANDLER-NEXT: do {
448
448
// TOO-MUCH-VOID-AND-ERROR-HANDLER-NEXT: try await tooMuchVoidAndErrorCompletion()
449
449
// TOO-MUCH-VOID-AND-ERROR-HANDLER-NEXT: completion((), (), nil)
@@ -457,7 +457,7 @@ func tooMuchVoidAndErrorCompletion(completion: (Void?, Void?, Error?) -> Void) {
457
457
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix VOID-PROPER-AND-ERROR-HANDLER %s
458
458
func tooVoidProperAndErrorCompletion( completion: ( Void ? , String ? , Error ? ) -> Void ) { }
459
459
// VOID-PROPER-AND-ERROR-HANDLER: {
460
- // VOID-PROPER-AND-ERROR-HANDLER-NEXT: async {
460
+ // VOID-PROPER-AND-ERROR-HANDLER-NEXT: Task {
461
461
// VOID-PROPER-AND-ERROR-HANDLER-NEXT: do {
462
462
// VOID-PROPER-AND-ERROR-HANDLER-NEXT: let result = try await tooVoidProperAndErrorCompletion()
463
463
// VOID-PROPER-AND-ERROR-HANDLER-NEXT: completion((), result.1, nil)
@@ -471,7 +471,7 @@ func tooVoidProperAndErrorCompletion(completion: (Void?, String?, Error?) -> Voi
471
471
// RUN: %refactor-check-compiles -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1
472
472
func voidAndErrorCompletion( completion: ( Void , Error ? ) -> Void ) { }
473
473
// VOID-AND-ERROR-HANDLER: {
474
- // VOID-AND-ERROR-HANDLER-NEXT: async {
474
+ // VOID-AND-ERROR-HANDLER-NEXT: Task {
475
475
// VOID-AND-ERROR-HANDLER-NEXT: do {
476
476
// VOID-AND-ERROR-HANDLER-NEXT: try await voidAndErrorCompletion()
477
477
// VOID-AND-ERROR-HANDLER-NEXT: completion((), nil)
0 commit comments