mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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: }
|
||||
|
||||
Reference in New Issue
Block a user