[Async Refactoring] Update to use Task's init

Use the Task initializer instead of the top-level
`async` function to match the latest Concurrency
API.

rdar:80888385
This commit is contained in:
Hamish Knight
2021-07-21 11:40:35 +01:00
parent 08a5c95654
commit 007b91cf7b
4 changed files with 43 additions and 43 deletions

View File

@@ -10,7 +10,7 @@ func simple(completion: @escaping (String) -> Void) { }
// SIMPLE-EMPTY:
// SIMPLE-NEXT: async_attribute_added.swift [[# @LINE-7]]:53 -> [[# @LINE-7]]:56
// SIMPLE-NEXT: {
// SIMPLE-NEXT: async {
// SIMPLE-NEXT: Task {
// SIMPLE-NEXT: let result = await simple()
// SIMPLE-NEXT: completion(result)
// SIMPLE-NEXT: }