Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Apr 18, 2025

…sure is in @preconcurrency context

Cherry-pick of #80737


  • Explanation:

    Downgrades an error to a warning when closure captures something non-Sendable in pre-concurrency context.

    The original check examined only the immediate closure, but it's possible that the closure happens to be in a preconcurrency context which also requires a downgrade.

  • Main Branch PR: [Concurrency] Downgrade non-Sendable type captures to warnings if clo… #80737

  • Risk: Low (Downgrades an error to a warning in a narrow set of circumstances that should not have any other side-effects and allow more code to type-check successfully).

  • Reviewed By: @hborla

  • Testing: Added new tests to the test suite.

  • Resolves: rdar://148996589

(cherry picked from commit cad2df3)

…sure is in @preconcurrency context

The original check examined only the immediate closure, but it's
possible that the closure happens to be in a preconcurrency context
which also requires a downgrade.

Resolves: rdar://148996589
(cherry picked from commit cad2df3)
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Apr 18, 2025
@xedin xedin requested a review from hborla April 18, 2025 23:14
@xedin
Copy link
Contributor Author

xedin commented Apr 18, 2025

@swift-ci please test

@xedin xedin requested a review from a team as a code owner April 18, 2025 23:15
@xedin xedin merged commit 7d77c61 into swiftlang:release/6.2 Apr 20, 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