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 Lazy implicit resolution with type parameters #991

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

joroKr21
Copy link
Collaborator

Fallback to replacing type parameters with bounded wildcards.
Might cause performance degradation in case of error so not sure.

Fixes #828

Fallback to replacing type parameters with bounded wildcards.
Might cause performance degradation in case of error so not sure.
@joroKr21 joroKr21 added the Bug label Mar 24, 2020
@joroKr21 joroKr21 added this to the shapeless-2.4.0 milestone Mar 24, 2020
@joroKr21 joroKr21 self-assigned this Mar 24, 2020
Copy link
Owner

@milessabin milessabin left a comment

Choose a reason for hiding this comment

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

I guess if this was internal to the compiler we'd add bounds to the typevars and let inference/implicit search do the job. This is probably the best we can do in a macro.

@joroKr21
Copy link
Collaborator Author

Even internally to the compiler enhancing type parameters with bounds is kinda buggy and side effecting. I tried to extend it to take advantage of the expected type but it didn't work: scala/scala#8582

@joroKr21 joroKr21 merged commit 17e3c6f into milessabin:master Mar 24, 2020
@joroKr21 joroKr21 deleted the lazy-type-params branch March 24, 2020 13:50
@milessabin
Copy link
Owner

Yeah, I tried something like that ages ago too.

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

Successfully merging this pull request may close these issues.

Lazy does not instantiate type parameters
2 participants