Skip to content

Fix #3012: Avoid swallowing multiple ()'s #3772

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 2 commits into from
Jan 8, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 7, 2018

Allow dropping at most one () if a method is called that exists
in both ()T and => T forms.

Allow dropping at most one () if a method is called that exists
in both ()T and => T forms.
@@ -64,6 +64,7 @@ object Typer {

private val ExprOwner = new Property.Key[Symbol]
private val InsertedApply = new Property.Key[Unit]
private val DroppedEmptyArgs = new Property.Key[Unit]
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 every key should have a documentation comment :).


object a extends fuz.Fuzbar {
override def str = ""
str()()()()()() // error: missing argument
Copy link
Member

Choose a reason for hiding this comment

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

Add a line with just str()() to check that it's also an error? A pos test with str and str() would be useful too.

@odersky odersky merged commit aa6459e into scala:master Jan 8, 2018
@allanrenucci allanrenucci deleted the fix-#3012 branch January 8, 2018 18:23
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