Skip to content

[Sema] Fix an issue with the ordering of effects checking and actor isolation checking. #76988

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
Oct 12, 2024

Conversation

hborla
Copy link
Member

@hborla hborla commented Oct 11, 2024

Effects checking for async needs actor isolation to have been computed, but currently effects checking happens first for initializers expressions. This change moves effects checking for initializer expressions to the primary decl checker, after the actor isolation checker runs. This change also fixes an issue where the actor isolation checker would walk into the bodies of sending closures when computing the required isolation of a default initializer expression.

Resolves: #73892

Effects checking for `async` requires actor isolation to have been
computed. This change removes effects checking out of the contextualize
initializers request, because effects checking isn't needed for
secondary files. Instead, effects checking is done in the primary decl
checker after actor isolation checking.
required isolation of a default value expression.
@hborla
Copy link
Member Author

hborla commented Oct 11, 2024

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented Oct 12, 2024

@swift-ci please smoke test

@hborla hborla force-pushed the init-checking-order branch from 85dd518 to e1bf198 Compare October 12, 2024 03:45
@hborla
Copy link
Member Author

hborla commented Oct 12, 2024

@swift-ci please smoke test

@hborla hborla merged commit 2f33d87 into swiftlang:main Oct 12, 2024
3 checks passed
@hborla hborla deleted the init-checking-order branch October 12, 2024 18:21
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.

Invalid async call in default initialized parameter
3 participants