Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[6.2][CSFix] SE-0470: Warn about missing @Sendable for unapplied static … #81356

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 1 commit into from
May 8, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 7, 2025

…member references until future Swift version

Cherry-pick of #81345


  • Explanation:

    Static member referenced were marked as @Sendable by InferSendableFromCaptures because metatypes used to be always Sendable which is no longer the case, so in order to maintain the source compatibility we need to downgrade missing @Sendable to a warning for unapplied static member references.

    This affects primarily operators at the moment because other static members form a curry thunk with a call inside and would be diagnosed as a capture.

  • Main Branch PR: [CSFix] SE-0470: Warn about missing @Sendable for unapplied static … #81345

  • Risk: Low (This is a narrow fix to make partially applied static members in argument positions type-check without @Sendable in Swift 6 mode).

  • Reviewed By: @DougGregor

  • Resolves: rdar://150777469

  • Testing: Added new tests to the test suite.

(cherry picked from commit a57310b)

…member references until future Swift version

Static member referenced were marked as `@Sendable` by `InferSendableFromCaptures`
because metatypes used to be always Sendable which is no longer the case, so in
order to maintain the source compatibility we need to downgrade missing `@Sendable`
to a warning for unapplied static member references.

This affects primarily operators at the moment because other static members
form a curry thunk with a call inside and would be diagnosed as a capture.

Resolves: rdar://150777469
(cherry picked from commit a57310b)
@xedin xedin requested a review from a team as a code owner May 7, 2025 16:16
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels May 7, 2025
@xedin
Copy link
Contributor Author

xedin commented May 7, 2025

@swift-ci please test

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