-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema] Correct 'await' insertion fixIt #72726
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
ea1b2d0
to
2eda5b7
Compare
@swift-ci please smoke test macOS |
I see a test failed, but I am a bit confused by the failure. |
The failure is not related. |
0dc03d0
to
4c142e4
Compare
@AnthonyLatsis @LucianoPAlmeida I've made some updates based off your suggestions. I first tried implementing a traversal through |
4c142e4
to
d90334a
Compare
d90334a
to
31e25c3
Compare
@swift-ci Please smoke test |
It seems good to me, but wait for code owners review before merging :) |
@xedin When you have some time - Could you take a look at this please? |
Sorry I missed this, will add it to the queue for Monday! |
I didn’t forget about this, will take a look tomorrow! |
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.
Thank you!
@swift-ci please smoke test |
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.
Good job!
Please consider tidying up the commit message. NB: I do not recommend including a link to the issue because it spawns permanent commit activity items in the issue every time you force-push, but if you wish to, please place the link in the body rather than the title. |
@AnthonyLatsis I will do this (tidy up commit message) and I see your point about linking the issue; I'll avoid doing that in the future. |
When using shorthand syntax for optional binding, if the variable we are binding is accessed asynchronously, provide an insertion fixIt of the form: ' = await (identifier)'. Previously, we would suggest only adding the 'await' which resulted in an error since the identifier is required.
@AnthonyLatsis Following the guidelines I cleaned up the commit message, I also have removed some of the not needed test functions you had pointed out. Thank you for all your reviewing! It is much appreciated. |
@swift-ci please smoke test |
Note this is a duplicate of a previously open pull request I'd closed accidentally: #71716
Resolves #65913
use fixItInsertAfter with the specialized fixIt given it is an implicit
DeclRefExpr
.My reasoning is that I saw in ParseStmt.cpp, where we parse a shorthand optional binding we have: