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

Use fullyDefinedType for mirror synthesis #15814

Merged
merged 3 commits into from
Aug 4, 2022

Conversation

bishabosha
Copy link
Member

fullyDefinedType is used by most factories in Synthesizer, so why not try with mirrors :)

fixing the test case was tricky because recursive implicit search isn't so simple for a contravariant typeclass. But I included an example of breaking the recursive knot, while limiting the amount of code generation

fixes #13146

@bishabosha
Copy link
Member Author

bishabosha commented Aug 3, 2022

ok, investigation is required to see why this fails for higher kinded types.

Edit: stripTypeVars is necessary to instantiate type lambdas, so we keep it, but perform after fullyDefinedType

@bishabosha bishabosha merged commit 5dee30b into scala:main Aug 4, 2022
@bishabosha bishabosha deleted the fix-13146 branch August 4, 2022 20:39
@bishabosha
Copy link
Member Author

bishabosha commented Aug 4, 2022

This isn't really a regression - it never worked in 3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type Class Derivation Does Not Work With Contravariant Types
3 participants