Skip to content

Backport "Two fixes to NamedTuple pattern matching" to 3.7.0 #22995

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 3 commits into from
Apr 14, 2025

Conversation

WojciechMazur
Copy link
Contributor

Backports #22953 to the 3.7.0-RC2.

PR submitted by the release tooling.

odersky added 3 commits April 14, 2025 11:39
 1. Fix translation for named patterns where the selector is a single-element
    named tuple. We used to take the whole tuple as result (which is correct
    for unnamed patterns) but for named patterns we have to select the field
    instead.
 2. Take account of named patterns in the refutability check.

[Cherry-picked cb97658]
[Cherry-picked ca80310]
@WojciechMazur WojciechMazur merged commit 1c80c61 into release-3.7.0 Apr 14, 2025
52 checks passed
@WojciechMazur WojciechMazur deleted the backport-release-3.7.0-22953 branch April 14, 2025 14:31
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