Skip to content

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

Merged
Kordyjan merged 1 commit intolts-17571from
lts-17570
Nov 17, 2023
Merged

Backport "Fix pattern generation in "ordinal" mirror method" to LTS#18940
Kordyjan merged 1 commit intolts-17571from
lts-17570

Conversation

@Kordyjan
Copy link
Copy Markdown
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
Copy Markdown
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