Skip to content

Fix #2009: Fix placeholder params logic for lambdas #2019

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 3 commits into from
Feb 22, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 22, 2017

Logic was missing placeholders in rhs of lambdas.

Logic was missing placeholders in rhs of lambdas.
@odersky odersky requested a review from smarter February 22, 2017 11:14
val t = expr1(location)
if (in.token == ARROW) {
placeholderParams = saved
closureRest(start, location, convertToParams(t))
placeholderParams = Nil
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why it's okay to forget the value of placeholderParams here, could you maybe add a comment clarifying this?

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM, thanks for the additional comment!

val t = expr1(location)
if (in.token == ARROW) {
placeholderParams = saved
closureRest(start, location, convertToParams(t))
placeholderParams = Nil // don't interprete `_' to the left of `=>` as a placeholder
Copy link
Member

Choose a reason for hiding this comment

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

typo: interprete -> interpret

@smarter smarter merged commit 6eeb06f into scala:master Feb 22, 2017
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.

2 participants