mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Concurrency] await try -> try await
The `try await` ordering is both easier to read and indicates the order of operations better, because the suspension point occurs first and then one can observe a thrown error.
This commit is contained in:
@@ -1223,7 +1223,7 @@ ERROR(super_in_closure_with_capture,none,
|
||||
NOTE(super_in_closure_with_capture_here,none,
|
||||
"'self' explicitly captured here", ())
|
||||
|
||||
ERROR(try_before_await,none, "'await' must precede 'try'", ())
|
||||
WARNING(await_before_try,none, "'try' must precede 'await'", ())
|
||||
WARNING(warn_await_keyword,none,
|
||||
"future versions of Swift reserve the word 'await'; "
|
||||
"if this name is unavoidable, use backticks to escape it", ())
|
||||
|
||||
Reference in New Issue
Block a user