Skip to content

SILGen: Fix an assert when emitting SIL for if #available #83035

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
Jul 15, 2025

Conversation

tshortli
Copy link
Contributor

Empty version numbers in availability specs are accepted by Sema prior to Swift 6, and when they occur in if #available queries they can make the query AST node invalid without aborting compilation. Adjust an assertion in SILGen to compensate.

Empty version numbers if availability specs are accepted by Sema prior to Swift
6, and when they occur in `if #available` queries they can make the query AST
node invalid without aborting compilation. Adjust an assertion in SILGen to
compensate.
@tshortli tshortli force-pushed the silgen-if-available-assert branch from a2d47d1 to fbe686d Compare July 14, 2025 18:07
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

@swift-ci please smoke test macOS

2 similar comments
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test macOS

@tshortli
Copy link
Contributor Author

@swift-ci please smoke test macOS

@tshortli tshortli merged commit eb122aa into swiftlang:main Jul 15, 2025
3 checks passed
@tshortli tshortli deleted the silgen-if-available-assert branch July 15, 2025 15:14
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