Skip to content

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