Skip to content

AST: Get SPI status of PatternBindingDecl from anchoring VarDecl #67811

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 2 commits into from
Aug 9, 2023

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Aug 8, 2023

For property declarations, the @_spi attribute is attached to the VarDecl AST node, rather than the PatternBindingDecl AST node, so the isSPI() query should take this into account. Failing to do so caused the availability checker to erroneously require that @_spi properties of types in -library-level api libraries have availability annotations.

Resolves rdar://113587321.

For property declarations, the `@_spi` attribute is attached to the VarDecl AST
node, rather than the PatternBindingDecl AST node, so the `isSPI()` query
should take this into account. Failing to do so caused the availability checker
to erroneously require that `@_spi` properties of types in `-library-level api`
libraries have availability annotations.

Resolves rdar://113587321.
@tshortli
Copy link
Contributor Author

tshortli commented Aug 8, 2023

@swift-ci please smoke test

@tshortli tshortli merged commit 7699834 into swiftlang:main Aug 9, 2023
@tshortli tshortli deleted the spi-property-availability branch August 9, 2023 05: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.

2 participants