Skip to content

Keep named arguments during eta expansion #1102

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

Merged
merged 1 commit into from
Feb 19, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 18, 2016

Fixes #1096. Review by @xeno-by

@xeno-by
Copy link

xeno-by commented Feb 19, 2016

Does this NamedArg carry a reference to the corresponding method parameter?

@DarkDimius
Copy link
Contributor

the name field indicates what was the name of method parameter.

@@ -48,13 +48,11 @@ object EtaExpansion {
}

/** Lift a function argument, stripping any NamedArg wrapper */
Copy link
Member

Choose a reason for hiding this comment

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

I think the documentation needs to be updated, since we don't strip the NamedArg anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do strip it, but then rewrap it around something else. I meant to do the change, but then decided it's too much busywork for too minor an improvement.

@xeno-by
Copy link

xeno-by commented Feb 19, 2016

@DarkDimius Is there a stronger connection, e.g. via a symbol?

@DarkDimius
Copy link
Contributor

No. Symbols of arguments of methods are only accessible inside the body of the method in Dotty.

odersky added a commit that referenced this pull request Feb 19, 2016
Keep named arguments during eta expansion
@odersky odersky merged commit 07bf063 into scala:master Feb 19, 2016
@allanrenucci allanrenucci deleted the fix-#1096 branch December 14, 2017 16:59
liufengyun added a commit to dotty-staging/dotty that referenced this pull request Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants