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

Extract unapply types like typedUnApply #15254

Merged
merged 1 commit into from
May 26, 2022

Conversation

dwijnand
Copy link
Member

Inside typedUnApply, argTypes depend on the result of applying the
unapply function (unapplyFn) on a "dummy arg", which results in calling
"safeSubstParams" (while constructing the tpd.Apply) instead of just
calling MethodType#instantiate.

Not doing the same thing in SpaceEngine#signature results in different
types that don't cancel each other, so we make SpaceEngine follow
Typer/Applications/TypeAssigner.

Inside typedUnApply, argTypes depend on the result of applying the
unapply function (unapplyFn) on a "dummy arg", which results in calling
"safeSubstParams" (while constructing the tpd.Apply) instead of just
calling MethodType#instantiate.

Not doing the same thing in SpaceEngine#signature results in different
types that don't cancel each other, so we make SpaceEngine follow
Typer/Applications/TypeAssigner.
@dwijnand dwijnand linked an issue May 20, 2022 that may be closed by this pull request
@dwijnand dwijnand marked this pull request as ready for review May 21, 2022 09:50
@dwijnand dwijnand requested a review from odersky May 21, 2022 09:50
@odersky odersky merged commit 1ea177d into scala:main May 26, 2022
@dwijnand dwijnand deleted the exh/ProjectionState branch May 28, 2022 17:29
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 1, 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.

Inexhaustive match warning despite being exhaustive
3 participants