Skip to content

Derive nonisolated members for protocol conformances #42041

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
Mar 26, 2022

Conversation

DougGregor
Copy link
Member

When deriving witnesses for protocol conformances within an
actor-isolated type, make those members 'nonisolated'. In the case
where this would work, for example because some of the state is
mutable, don't allow derivation of those witnesses.

Fixes rdar://90233250.

When deriving witnesses for protocol conformances within an
actor-isolated type, make those members 'nonisolated'. In the case
where this would work, for example because some of the state is
mutable, don't allow derivation of those witnesses.

Fixes rdar://90233250.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

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.

Nice one, LGTM. Should be fine with distributed as well since those will show up as actor isolated so preventing the attr adding in addNonIsolatedToSynthesized 👍

@DougGregor DougGregor merged commit 3c8405a into swiftlang:main Mar 26, 2022
@DougGregor DougGregor deleted the derive-nonisolated-witnesses branch March 26, 2022 03:36
tshortli added a commit to tshortli/swift that referenced this pull request Nov 9, 2022
…ods.

swiftlang#42041 introduced a centralized mechanism for adding the `nonisolated` attribute to synthesized decls but did not clean up the existing code that was already doing so for `Hashable` conformances.

Resolves rdar://102106591
tshortli added a commit to tshortli/swift that referenced this pull request Nov 9, 2022
…ods.

swiftlang#42041 introduced a centralized mechanism for adding the `nonisolated` attribute to synthesized decls but did not clean up the existing code that was already doing so for `Hashable` conformances.

Resolves rdar://102106591
meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request Nov 9, 2022
…ods.

swiftlang#42041 introduced a centralized mechanism for adding the `nonisolated` attribute to synthesized decls but did not clean up the existing code that was already doing so for `Hashable` conformances.

Resolves rdar://102106591
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