Skip to content

Normalize tuple types when typing patterns#25335

Merged
hamzaremmal merged 1 commit into
scala:mainfrom
hamzaremmal:i22923
Mar 20, 2026
Merged

Normalize tuple types when typing patterns#25335
hamzaremmal merged 1 commit into
scala:mainfrom
hamzaremmal:i22923

Conversation

@hamzaremmal

Copy link
Copy Markdown
Member

Generic Tuples and TupleN for N < 23 are technically equivalent (from a spec point of view).
As such, we add support to auto untupling in patterns to conform to the following part of the specification by normalizing the tuple types before checking the number of arguments.

Closes #22923

@hamzaremmal hamzaremmal merged commit 196362d into scala:main Mar 20, 2026
62 checks passed
@hamzaremmal hamzaremmal deleted the i22923 branch March 20, 2026 09:00
@WojciechMazur WojciechMazur added this to the 3.8.4 milestone Mar 31, 2026
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.

Incorrect "Wrong number of argument patterns" error for Option extractor using Tuple.Map

4 participants