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

Syntax Change: Allow '.' in front of extension method #7914

Closed
wants to merge 2 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 7, 2020

Allow

def (c: Circle).circumference: Double

alongside

def (c: Circle) circumference: Double

The syntax with '.' is preferred for normal methods which have names
starting with a letter and which are not declared @infix. Right now,
this preference is not enforced.

@odersky odersky added this to the 0.22 Tech Preview milestone Jan 7, 2020
@odersky odersky requested a review from sjrd January 7, 2020 13:43
@odersky
Copy link
Contributor Author

odersky commented Jan 7, 2020

the PR changes docs as well as implementation. To avoid confusion, it should be merged just before the next release. so that we can keep the two in sync.

Allow

    def (c: Circle).circumference: Double

alongside

    def (c: Circle) circumference: Double

The syntax with '.' is preferred for normal methods, which have names
starting with a letter and which are not declared @infix. Right now,
this preference is not enforced.
@odersky odersky force-pushed the change-extmethods2 branch from 682e7b5 to 9a0ddcd Compare January 7, 2020 13:47
Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Thank you!

@odersky
Copy link
Contributor Author

odersky commented Jan 7, 2020

@bishabosha There's a bunch of semanticdb tests that need to be updated. Can you take care of that? Thanks!

@bishabosha bishabosha assigned odersky and unassigned bishabosha Jan 10, 2020
@odersky
Copy link
Contributor Author

odersky commented Jan 13, 2020

Superseded by #7917

@odersky odersky closed this Jan 13, 2020
@bishabosha bishabosha deleted the change-extmethods2 branch September 10, 2021 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants