Skip to content
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

[Sema] Emit dynamic actor isolation checks for derived protocol witnesses #78650

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 15, 2025

Covers Equatable, Hashable, and Codable derivations. RawRepresentable, Comparable are not applicable here because derivation is limited to enums.

The main chance here is to not inject nonisolated attribute when synthesizing witnesses for @preconcurrency conformances during derivation, the compiler would make sure that they are used in correct isolation context by injecting dynamic action isolation checks.

Resolves: rdar://142567811

xedin added 3 commits January 14, 2025 15:44
…s for `@preconcurrency` conformances

If derived conformance is marked as `@preconcurrency` instead of
marking synthesized members as `nonisolated` the compiler should
insert dynamic checks.
@xedin
Copy link
Contributor Author

xedin commented Jan 15, 2025

@swift-ci please test

@xedin xedin merged commit 1932d07 into swiftlang:main Jan 15, 2025
5 checks passed
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