Skip to content

AST: Centralize AvailabilityDomain lookup #79626

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 3 commits into from
Feb 26, 2025

Conversation

tshortli
Copy link
Contributor

Implement lookup of availability domains for identifiers on AvailabilityDomainOrIdentifier. Add a bit to that type which represents whether or not lookup has already been attempted. This allows both AvailableAttr and AvailabilitySpec to share a common implementation of domain lookup.

Also, fix a bug in the diagnostics for missing wildcards in @available attributes.

The previous algorithm failed to correctly handle the cases where some grouped
`@available` attributes could be marked invalid prior to type checking
attributes.
Implement lookup of availability domains for identifiers on
`AvailabilityDomainOrIdentifier`. Add a bit to that type which represents
whether or not lookup has already been attempted. This allows both
`AvailableAttr` and `AvailabilitySpec` to share a common implementation of
domain lookup.
@tshortli tshortli force-pushed the availability-domain-lookup branch from ece70eb to 62c8e72 Compare February 26, 2025 06:10
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli merged commit 45277d2 into swiftlang:main Feb 26, 2025
4 of 5 checks passed
@tshortli tshortli deleted the availability-domain-lookup branch February 26, 2025 15:13
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.

1 participant