Skip to content

[6.2] Sema: Omit internal from MemberImportVisibility fix-its when appropriate #81782

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

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented May 27, 2025

  • Explanation: Explicit access levels should be omitted from MemberImportVisibility fix-its when InternalImportsByDefault is enabled, the required import needs an internal access level or lower, and the module is not yet imported explicitly in any other file.
  • Scope: Affects diagnostics emitted about missing imports when MemberImportVisibility is enabled.
  • Issue/Radar: rdar://149577615
  • Original PR: Sema: Omit internal from MemberImportVisibility fix-its when appropriate #81781
  • Risk: Low. These changes only affect the content of fix-its attached to diagnostics that are only emitted when code is already broken.
  • Testing: New compiler tests added.
  • Reviewer: @xymus

tshortli added 2 commits May 26, 2025 22:39
…opriate.

Omit an explicit access level from `MemberImportVisibility` fix-its under the
following conditions:

- `InternalImportsByDefault` is enabled.
- The required import needs an `internal` access level or lower.
- The module is not yet imported explicitly in any other file.

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

@swift-ci please test

@tshortli tshortli added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels May 27, 2025
@tshortli tshortli marked this pull request as ready for review May 27, 2025 16:47
@tshortli tshortli requested a review from a team as a code owner May 27, 2025 16:47
@tshortli tshortli requested a review from nkcsgexi May 27, 2025 16:48
@tshortli tshortli enabled auto-merge May 27, 2025 16:48
@tshortli tshortli merged commit 691e42e into swiftlang:release/6.2 May 27, 2025
5 checks passed
@tshortli tshortli deleted the member-import-visibility-fixit-implicitly-internal-6.2 branch May 27, 2025 16:59
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.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants