Skip to content

Sema: Inherit SPI groups when synthesizing modify accessor #65542

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 2 commits into from
May 2, 2023

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented May 1, 2023

When synthesizing a _modify coroutine for a property, ensure the implicit declaration gets the same SPI groups as the property setter since they should have the same visibility.

Additionally, diagnose the exportability of references to accessors. Previously resilience type checking assumed that accessors always have the same exportability as their storage, but with @_spi accessors this is no longer the case.

Resolves rdar://108069565

@tshortli tshortli requested review from xymus and nkcsgexi May 1, 2023 16:13
@tshortli
Copy link
Contributor Author

tshortli commented May 1, 2023

@swift-ci please test

tshortli added 2 commits May 1, 2023 15:34
Properties may have `@_spi` setters and therefore the exportability of a
referenced accessor may differ from the exportability of the storage.
@tshortli tshortli force-pushed the implicit-modify-inherit-spi branch from 91ac9f1 to f11eaf1 Compare May 1, 2023 22:34
@tshortli
Copy link
Contributor Author

tshortli commented May 1, 2023

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

tshortli commented May 2, 2023

@swift-ci please smoke test macOS

@tshortli tshortli merged commit 872f45d into swiftlang:main May 2, 2023
@tshortli tshortli deleted the implicit-modify-inherit-spi branch May 2, 2023 20:11
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.

5 participants