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

Allow eta-expansion of methods with dependent types #10166

Merged
merged 1 commit into from Nov 24, 2022
Merged

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Sep 27, 2022

}
val expansion = etaExpand(tree, context.owner)
if (context.undetparams.isEmpty) typed(expansion, mode, pt)
else instantiate(typed(expansion, mode), mode, pt)
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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

@SethTisue
Copy link
Member

@som-snytt care to give this a second round of review?

@lrytz lrytz mentioned this pull request Nov 24, 2022
Copy link
Contributor

@som-snytt som-snytt left a 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.

@lrytz lrytz merged commit af31ada into scala:2.13.x Nov 24, 2022
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
4 participants