Skip to content

Backport "Fix pattern generation in "ordinal" mirror method" to LTS #18940

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
Nov 17, 2023

Conversation

Kordyjan
Copy link
Contributor

Backports #17570 to the LTS branch.

PR submitted by the release tooling.

The "ordinal" method generated non-sensical patterns if the cases
of a sealed trait were found in the trait itself. In that case the
ordinal method would be placed in the companion object, but still tried
to access the cases via the `this` of the companion class.

We are  now more careful and fall back to type projections in
comparisons.

Fixes #17556

[Cherry-picked a0be3d6]
@Kordyjan
Copy link
Contributor Author

@Kordyjan Kordyjan merged commit 23349d4 into lts-17571 Nov 17, 2023
@Kordyjan Kordyjan deleted the lts-17570 branch November 17, 2023 13:42
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