Skip to content

Should there be only one context function literal syntax? #10056

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
bishabosha opened this issue Oct 21, 2020 · 2 comments
Closed

Should there be only one context function literal syntax? #10056

bishabosha opened this issue Oct 21, 2020 · 2 comments

Comments

@bishabosha
Copy link
Member

bishabosha commented Oct 21, 2020

Minimized example

val m = (x: Int) ?=> x       // query style, mirrors type
val n = (using x: Int) ?=> x // mixing styles
val o = (using x: Int) => x  // used by the MOOC

Output

they all compile

Expectation

Only one of these should be accepted I assume. Looking at the syntax these are all legitimate, but the docs uses the third kind

@bishabosha bishabosha changed the title Which context function syntax? Which context function literal syntax? Oct 21, 2020
@bishabosha bishabosha changed the title Which context function literal syntax? Should there be only one context function literal syntax? Oct 21, 2020
@OlivierBlanvillain
Copy link
Contributor

Yes! I vote for the last one.

@odersky odersky added this to the 3.0.0-M1 milestone Oct 26, 2020
@odersky
Copy link
Contributor

odersky commented Oct 26, 2020

Yes, it was an oversight that the old syntax was not removed. I'll get to it.

odersky added a commit that referenced this issue Oct 27, 2020
Fix #10056: Drop old context function closure syntax
odersky added a commit to dotty-staging/dotty that referenced this issue Nov 25, 2020
odersky added a commit to dotty-staging/dotty that referenced this issue Nov 25, 2020
odersky added a commit to dotty-staging/dotty that referenced this issue Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants