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 Mirror.Product for type lambdas #14003

Merged
merged 1 commit into from
Dec 2, 2021
Merged

Conversation

joroKr21
Copy link
Member

@joroKr21 joroKr21 commented Nov 26, 2021

We don't need to guess how the type parameters should be substituted.
Instead we can use the result type directly to obtain the member type.
This exposed another issue - the mirrored type contained type variables.
To get rid of them we apply Type.stripTypeVar recursively.

Fixes #13859

@joroKr21
Copy link
Member Author

Sorry but I will mark this ready for review because it requires a maintainer to approve the CI run

@joroKr21 joroKr21 marked this pull request as ready for review November 26, 2021 00:47
@joroKr21 joroKr21 marked this pull request as draft November 26, 2021 09:53
We don't need to guess how the type parameters should be substituted.
Instead we can use the result type directly to obtain the member type.
This exposed another issue - the mirrored type contained type variables.
To get rid of them we apply `Type.stripTypeVar` recursively.
@joroKr21 joroKr21 marked this pull request as ready for review November 26, 2021 13:07
Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@bishabosha bishabosha merged commit 1003d7c into scala:master Dec 2, 2021
@joroKr21 joroKr21 deleted the product-mirror branch December 2, 2021 14:04
@Kordyjan Kordyjan added this to the 3.1.2 milestone 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.

MirroredElemTypes for Tuples
3 participants