Skip to content

Fix #9088: Fix problematic code in productMirror #9089

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

Closed
wants to merge 3 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 31, 2020

No description provided.

@@ -279,7 +279,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
case mirroredType: HKTypeLambda =>
val elems =
mirroredType.derivedLambdaType(
resType = TypeOps.nestedPairs(accessors.map(mirroredType.memberInfo(_).widenExpr))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

mirroredType.memberInfo(_) makes no sense here. mirroredType is a type lambda, and as such not a legal prefix on which we can take a memberInfo. So I changed to just _.info which avoids the crash. However, I have no idea whether that's correct.

@odersky
Copy link
Contributor Author

odersky commented May 31, 2020

@milessabin This looks still fishy to me. But I have no idea how to formulate a correct derivation in the higher-kinded case.

@odersky
Copy link
Contributor Author

odersky commented Jun 3, 2020

This is merged as part of #9090. @milessabin it would still be good if you could take a look at the changes to the higher-kinded product mirror materialization.

@odersky odersky closed this Jun 3, 2020
@milessabin
Copy link
Contributor

I'm not seeing anything obviously problematic about the change.

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