Skip to content

SIL: Private setters need at least hidden visibility for key paths in more cases. #38525

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

Conversation

jckarter
Copy link
Contributor

My original fix only addressed the issue for when the property was exactly internal, so
we would still run into problems with keypaths and private(set) when -enable-testing
is on, or when referring to public properties with private setters from the same module.
This generalizes the rule, so that the setter entry point for any property with
at least internal visibility also has at least internal visibility, even if the setter
is semantically less visible. Fixes rdar://78523318.

… more cases.

My original fix only addressed the issue for when the property was exactly internal, so
we would still run into problems with keypaths and `private(set)` when `-enable-testing`
is on, or when referring to `public` properties with private setters from the same module.
This generalizes the rule, so that the setter entry point for any property with
at least internal visibility also has at least internal visibility, even if the setter
is semantically less visible. Fixes rdar://78523318.
@jckarter jckarter requested a review from slavapestov July 20, 2021 23:35
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit deceb45 into swiftlang:main Jul 21, 2021
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