Skip to content

[Concurrency] Don't error on isolated property wrapper initializers inside MainActor-isolated structs. #73168

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
Apr 22, 2024

Conversation

hborla
Copy link
Member

@hborla hborla commented Apr 21, 2024

This was caused by a rule that removed @MainActor from stored properties, which was gated behind -swift-version 6. This rule is incorrect, because the property can have an isolated default value. The proper rule for allowing nonisolated access to isolated stored properties of structs within the module is proposed in SE-0434, and implemented under GlobalActorIsolatedTypesUsability.

@hborla
Copy link
Member Author

hborla commented Apr 21, 2024

@swift-ci please smoke test

@hborla hborla force-pushed the isolated-backing-property-wrapper branch from 488400a to a6d9c15 Compare April 21, 2024 17:01
@hborla
Copy link
Member Author

hborla commented Apr 21, 2024

@swift-ci please smoke test

@hborla hborla merged commit a08c240 into swiftlang:main Apr 22, 2024
@hborla hborla deleted the isolated-backing-property-wrapper branch April 22, 2024 02:44
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.

1 participant