Skip to content

[Concurrency] Downgrade missing await error to a warning for synchronous access to isolated global/static lets. #70151

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 1 commit into from
Dec 1, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Dec 1, 2023

Compiler versions <5.10 allowed this code, so the error should be staged in as a warning until Swift 6.

The only effect checker diagnostics downgraded by this change are the ones introduced in #69607.

…onous

access to isolated global and static variables that are lazily initialized.
@hborla
Copy link
Member Author

hborla commented Dec 1, 2023

@swift-ci please smoke test

/// the var is read.
bool isLetAccessibleAnywhere(const ModuleDecl *fromModule,
VarDecl *let,
ActorReferenceResult::Options &options);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that I added this as a new overload because the original is in include/swift/AST/ActorIsolation.h and I didn't see a good reason to expose ActorReferenceResult outside of Sema.

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Looks right, went to quickly with making it errors in previous PR huh.
Flag like this sounds good 👍

LGTM!

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