Skip to content

[6.1] Sema: Ensure access-level on imports only applies to visible imported decls #78718

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

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Jan 17, 2025

Access-level on imports are designed to downgrade the visibility of imported decls. Add a check to apply this logic only to decls that were originally visible: public and same-package decls. Otherwise a private import can allow a partial visibility into an imported internal decl.

…ible

Access-level on imports is designed to downgrade the visibility of
imported decls. Add a check to apply this logic only to decls that were
originally visible: public and same-package.

rdar://143008763
@xymus xymus added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.1 labels Jan 17, 2025
@xymus xymus requested a review from a team as a code owner January 17, 2025 19:52
@xymus
Copy link
Contributor Author

xymus commented Jan 17, 2025

@swift-ci Please test

@xymus xymus requested a review from nkcsgexi January 17, 2025 19:52
@xymus
Copy link
Contributor Author

xymus commented Jan 21, 2025

@swift-ci Please test macOS

@xymus xymus merged commit dc74591 into swiftlang:release/6.1 Jan 22, 2025
5 checks passed
@xymus xymus deleted the fix-importing-non-visible-decls-6.1 branch January 22, 2025 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants