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

Fix HK quoted pattern type variables #16980

Conversation

nicolasstucki
Copy link
Contributor

The issue was in the encoding into {ExprMatchModule,TypeMatchModule}.unapply. Specifically with the TypeBindings argument. This arguments holds the list of type variable definitions (tpd.Bind trees). We used a Tuple to list all the types inside. The problem is that higher-kinded type variables do not conform with the upper bounds of the tuple elements. The solution is to use an HList with any-kinded elements.

Backport of #16907

The issue was in the encoding into `{ExprMatchModule,TypeMatchModule}.unapply`.
Specifically with the `TypeBindings` argument. This arguments holds the
list of type variable definitions (`tpd.Bind` trees). We used a `Tuple`
to list all the types inside. The problem is that higher-kinded type
variables do not conform with the upper bounds of the tuple elements.
The solution is to use an HList with any-kinded elements.
@Kordyjan Kordyjan merged commit aecbfa7 into scala:release-3.3.0 Feb 21, 2023
@Kordyjan Kordyjan deleted the backport-fix-hk-quoted-pattern-type-variables branch February 21, 2023 13:54
@Kordyjan Kordyjan modified the milestones: 3.3.0 backports, 3.3.0 Aug 2, 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.

2 participants