Skip to content
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

Refine handling of pattern binders for large tuples #19085

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 26, 2023

Extracted from the named tuples PR, where it allowed the correct typing of

val bob = (
  x0 = 0, x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 0, x8 = 0, x9 = 0,
  name = "Bob", y1 = 0, age = 33, y2 = 0,
  z0 = 0, z1 = 0, z2 = 0, z3 = 0, z4 = 0, z5 = 0, z6 = 0, z7 = 0, z8 = 0, z9 = 0)

  bob match
    case p @ (name = "Bob", age = a) =>
      p,age

The problem was that p was typed before as <some large tuple type> & TupleXXL and that prevented the correct analysis of tuple elements.

I am submitting this as a separate PR since it might also be relevant for #19084.

@odersky odersky merged commit 5ebeb7b into scala:main Nov 27, 2023
19 checks passed
@odersky odersky deleted the change-pattern-binding branch November 27, 2023 13:00
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
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.

3 participants