Skip to content

[Refactoring] Support async for function extraction #37651

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

Merged
merged 4 commits into from
May 26, 2021

Conversation

hamishknight
Copy link
Contributor

Adapt the ThrowingEntityAnalyzer to pick up any await keywords and add an async to the extracted function if necessary along with an await for its call.

rdar://72199949

If we're extracting a function that throws, add
a `try` to the call.
We don't want to consider any `try` exprs here.
Adapt the `ThrowingEntityAnalyzer` to pick up any
`await` keywords and add an `async` to the extracted
function if necessary along with an `await` for its
call.

rdar://72199949
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight requested a review from benlangmuir May 26, 2021 11:43
Copy link
Contributor

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@hamishknight hamishknight merged commit ccfea08 into swiftlang:main May 26, 2021
@hamishknight hamishknight deleted the let-that-async-in branch May 26, 2021 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants