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

Prioritise sequence-matches over product-sequence-matches #19260

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

dwijnand
Copy link
Member

No description provided.

@dwijnand dwijnand marked this pull request as ready for review December 13, 2023 21:14
@dwijnand dwijnand requested a review from sjrd December 13, 2023 21:14

class Test:
def m1(t1: T1): Unit = t1 match
case VarExt(c1, cs*) => // CCE: class P1 cannot be cast to class E1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this test be a run test, in order to exercise this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do. At some point I was curious as to what the code would do if I made it compile without the TypeTestCasts compile error, and it indeed threw. But this part of the code I just left as potentially useful debugging if returned to. But we can also make it actually part of the test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not actually part of testing #19221 per se, then it can be left as is.

@dwijnand dwijnand merged commit b1d1fe8 into scala:main Dec 15, 2023
19 checks passed
@dwijnand dwijnand deleted the seq-match-prio branch December 15, 2023 12:25
@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.

product-sequence-matches interferes when only sequence-match is applicable
3 participants