Skip to content

Parse: Diagnose empty version numbers #72449

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 20, 2024

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Mar 20, 2024

The compiler treats version tuples that are all zeros as empty, or the same as not having a version. Diagnose attempts to specify all-zeroes versions in attributes and availability queries to prevent surprising behavior. The diagnostic is staged as a warning before Swift 6 to preserve source compatibility.

Resolves rdar://124661151

The compiler treats version tuples that are all zeros as empty, or the same as
not having a version. Diagnose attempts to specify all-zeroes versions in
attributes and availability queries to prevent surprising behavior.

Resolves rdar://124661151
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli merged commit f999f04 into swiftlang:main Mar 20, 2024
@tshortli tshortli deleted the invalid-availability-version branch March 20, 2024 15:08
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