Skip to content

Sema: Diagnose inconsistent use of @_weakLinked import #60519

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 4 commits into from
Aug 12, 2022

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Aug 11, 2022

Just like for @_implementationOnly import, we need to diagnose inconsistency in use of the @_weakLinked attribute.

@_weakLinked import Foo
// ...
import Foo // error: 'Foo' inconsistently imported with @_weakLinked

Resolves rdar://98465034

@tshortli tshortli force-pushed the inconsistent-weak-linked-import branch from 6578047 to 560cc1b Compare August 11, 2022 23:01
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli marked this pull request as ready for review August 11, 2022 23:01
@tshortli
Copy link
Contributor Author

@swift-ci please test

… make the inconsistency detection general so that it can be reused for checking for inconsistent `@_weakLinked` imports.
… instead of auxiliary files to make it easier to see the whole test at once.
@tshortli tshortli force-pushed the inconsistent-weak-linked-import branch from e65fe1e to 1739528 Compare August 12, 2022 16:46
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test and merge

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this!

@swift-ci swift-ci merged commit 74f97d4 into swiftlang:main Aug 12, 2022
@tshortli tshortli deleted the inconsistent-weak-linked-import branch August 23, 2022 18:26
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.

4 participants