Skip to content

[Concurrency] Ensure we do implicit-async from @actorIndependent & global-actors contexts #36142

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 2 commits into from
Feb 25, 2021

Conversation

DougGregor
Copy link
Member

We weren't allowing implicit "async" promotions for cross-actor references
from functions defined within an actor that were @actorIndependent
or part of a global actor. Ensure we do promotion there.

... and because these lead to misleading diagnostics in a lot of places,
don't do implicit "async" promotion if we're not in an async context
already. We still need to improve the diagnostics here.

…obal-actors contexts

We weren't allowing implicit "async" promotions for cross-actor references
from functions defined within an actor that were @actorIndependent
or part of a global actor. Ensure we do promotion there.

... and because these lead to misleading diagnostics in a lot of places,
don't do implicit "async" promotion if we're not in an async context
already. We still need to improve the diagnostics here.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

Copy link
Member

@kavon kavon left a comment

Choose a reason for hiding this comment

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

👍🏼

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 16d3f78 into swiftlang:main Feb 25, 2021
@DougGregor DougGregor deleted the implicit-actor-nonactor-self branch February 25, 2021 07:32
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.

3 participants