Skip to content

[6.2] Sema: Fix the insertion location for conformances attributes #82664

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

Conversation

AnthonyLatsis
Copy link
Collaborator

  • Explanation:

    We were using ProtocolNameLoc for the insertion location, which is not necessarily the start location of the TypeRepr associated with the conformance:

    warning: conformance of 'S' to 'P' should be marked 'nonisolated' to retain its behavior with upcoming feature 'InferIsolatedConformances' [isolated_conformance_will_become_nonisolated] [#IsolatedConformances]
    @MainActor struct S: @unsafe Nested.P {}
                                        ^
                                        nonisolated
    

    This fix is important for error-free automatic migration to StrictMemorySafety and InferIsolatedConformances.

  • Scope: Diagnostics QoI for fix-its that insert a conformance attribute.

  • Issues: rdar://132570262

  • Original PRs: Sema: Fix the insertion location for conformances attributes #82452

  • Risk: Low

  • Testing: Smoke test. Added regression tests.

  • Reviewers: @DougGregor

@AnthonyLatsis AnthonyLatsis requested a review from a team as a code owner July 1, 2025 02:12
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please test macOS

@AnthonyLatsis AnthonyLatsis enabled auto-merge July 2, 2025 06:48
@AnthonyLatsis AnthonyLatsis merged commit 6ddd1c9 into release/6.2 Jul 2, 2025
5 checks passed
@AnthonyLatsis AnthonyLatsis deleted the jepa2-6.2 branch July 2, 2025 15:51
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