-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Disable old context function syntax #10786
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes will allow to use the context arrow to define a no-arg lambda
val f = () ?=> 0
which is typed as a plain Function0 () => Int
@bishabosha Can you take the PR over please and fix the problem? I am swamped, so won't have the time. Thanks! |
this should be ready to go |
@bishabosha there is still a failure -- Error: tests/pos/i7778.scala:11:34 ----------------------------------------------------------------------------------
final case class Foo[A, B](run: () ?=> Int)
^^
context function types require at least one parameter |
oh right, i did not expect to see that explicitly as a pos test, seems confusing to want to allow 0 arg ctx fn. Ill move it to neg |
1f1bfd0
to
1c7dfe5
Compare
It looks like we also need to fix the community build https://github.com/lampepfl/dotty/runs/1550414420 |
I think it will be ok, both tasks passed after the compiler sources were fixed in 59bca1c |
only community build to go - hopefully it passes |
Fixes #10697