Skip to content

[CodeCompletion] Don't recommend functions with async alternatives in async contexts #59000

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

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 20, 2022

When an function has an async alternative, that should be preferred when we are completing in an async context. Thus, the sync method should be marked as not recommended if the current context can handle async methods.

rdar://88354910

… async contexts

When an function has an async alternative, that should be preferred when we are completing in an async context. Thus, the sync method should be marked as not recommended if the current context can handle async methods.

rdar://88354910
@ahoppen ahoppen force-pushed the pr/dont-recommend-func-with-async-alternative branch from 340a18a to daec367 Compare August 1, 2022 12:29
@ahoppen ahoppen requested a review from rintaro August 1, 2022 12:29
@ahoppen
Copy link
Member Author

ahoppen commented Aug 1, 2022

@swift-ci Please smoke test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

Nice!

@ahoppen ahoppen merged commit 227f0de into swiftlang:main Aug 2, 2022
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