Skip to content

Fix #1503: anonymous application of FunctionX #1508

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

Closed
wants to merge 2 commits into from

Conversation

felixmulder
Copy link
Contributor

No description provided.

@@ -573,6 +573,12 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
else
new ApplyToUntyped(tree, fun1, funRef, proto, pt)(argCtx(tree))
convertNewGenericArray(ConstFold(app.result))
case mt: MethodType =>
Copy link
Member

Choose a reason for hiding this comment

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

I would squash this commit and the next one in the third commit, no need to record everything that was tried.

@felixmulder
Copy link
Contributor Author

Addressed @smarter's concerns - we'd like input by @odersky on the fix however, so waiting on that before merging.

// When this happens we simply remove the select to make expr1 a valid
// block expression. The `.apply` will be added back around the block when
// the block itself is adapted later.
val expr1 = typedExpr(tree.expr, pt)(exprCtx) match {
Copy link
Contributor

Choose a reason for hiding this comment

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

But what if the .apply was added explicitly by the user? Then it should not be removed. It seems we need another solution.

@odersky
Copy link
Contributor

odersky commented Sep 17, 2016

Superseded by #1522.

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.

3 participants