Skip to content

ConstraintSystem: Make key paths for properties with unavailable setters read-only #83054

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tshortli
Copy link
Contributor

Previously, only conditional unavailability was considered, but setters that are always unavailable must also make a keypath read-only.

Resolves rdar://155832511.

@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli
Copy link
Contributor Author

@swift-ci please test source compatibility

…ers read-only.

Previously, only conditional unavailability was considered, but setters that
are always unavailable must also make a keypath read-only.

Resolves rdar://155832511.
…renced.

In implicit contexts that are universally unavailable, allow writable key paths
to be formed to properties with setters that are also marked as universally
unavailable. This fixes a regression from the previous commit where the code
synthesized for `@Observable` properties in universally unavailable classes was
rejected by the availability checker.
@tshortli tshortli force-pushed the unavailable-setters-require-read-only-key-paths branch from ce3ac35 to 99380bf Compare July 15, 2025 21:14
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli enabled auto-merge July 15, 2025 21:15
@tshortli
Copy link
Contributor Author

@swift-ci please test Linux

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