-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Concurrency] Fix try-await fix-it #36763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please smoke test |
@swift-ci please smoke test macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼 this is great. Thanks! Just had one suggestion.
We want to be able to put the `try` before the `await`, so we need to make it available where we emit the diagnostics and fix-its. The easiest way to do that was through the context object.
Actually put the try fix-it before the await if it is available.
Updating the test to verify that we're putting the try fix-its in the right place.
9a6f067
to
45c81c2
Compare
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@swift-ci please smoke test windows |
The Windows failure is an unrelated change that was made to lldb. compnerd and kastiglione have two PR’s with fixes that are racing each other. Compnerd’s is swiftlang/llvm-project#2808. |
This patch fixes the order that the fix-it for
try
is emitted. It was prepending it to the call, but if an await is present, it should go before that instead. e.gtry await foo()
instead ofawait try foo()
.Resolves: rdar://71058133