Skip to content

[6.1] [CS] Add a narrow hack for rdar://139234188 #77827

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
Dec 2, 2024

Conversation

hamishknight
Copy link
Contributor

6.1 cherry-pick of #77802

  • Explanation: Fixes a spurious @Sendable mismatch error when pattern-matching in Swift 6 language mode
  • Scope: Affects type-checking of patterns in Swift 6 language mode
  • Issue: rdar://139234188
  • Risk: Low, the fix is straightforward and narrow
  • Testing: Added tests to test suite
  • Reviewer: Pavel Yaskevich

Currently we set `FunctionRefKind::Compound` for
enum element patterns with tuple sub-patterns to
ensure the member has argument labels stripped. As
such, we need to account for the correct application
level in `getNumApplications`. We ought to be
setting the correct FunctionRefKind and properly
handling the label matching in the solver though.
We also ought to consider changing FunctionRefKind
such that "is compound" is a separate bit from the
application level.

rdar://139234188
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.1 labels Nov 25, 2024
@hamishknight hamishknight requested a review from a team as a code owner November 25, 2024 10:44
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 7db95fb into swiftlang:release/6.1 Dec 2, 2024
5 checks passed
@hamishknight hamishknight deleted the rdar139234188-6.1 branch December 2, 2024 17:37
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.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants