Skip to content

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

@xedin xedin merged commit 9bd0a34 into swiftlang:release/6.2 May 8, 2025
5 checks passed
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