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
Allow eta-expansion of methods with dependent types #10166
Conversation
} | ||
val expansion = etaExpand(tree, context.owner) | ||
if (context.undetparams.isEmpty) typed(expansion, mode, pt) | ||
else instantiate(typed(expansion, mode), mode, pt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the restriction yet, but etaExpand
still has adriaanm comment that not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll be off for a week 🇷🇴 and don't have more time right now to try to break it, will get back to it after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enjoy! Insert joke about children as dependent types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few more tests, AFAICT etaExpand
works well with dependent method types
@som-snytt care to give this a second round of review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lukas could have just told me in September how badly I needed this.
Fixes scala/bug#12641