Skip to content

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

Merged
merged 5 commits into from
Dec 15, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 14, 2020

Fixes #10697

@odersky odersky added this to the 3.0.0-M3 milestone Dec 14, 2020
Copy link
Member

@bishabosha bishabosha left a 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

@odersky
Copy link
Contributor Author

odersky commented Dec 14, 2020

@bishabosha Can you take the PR over please and fix the problem? I am swamped, so won't have the time. Thanks!

@bishabosha
Copy link
Member

this should be ready to go

@nicolasstucki
Copy link
Contributor

@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

@bishabosha
Copy link
Member

@bishabosha there is still a failure

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

@nicolasstucki
Copy link
Contributor

It looks like we also need to fix the community build https://github.com/lampepfl/dotty/runs/1550414420

@bishabosha
Copy link
Member

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

@bishabosha
Copy link
Member

only community build to go - hopefully it passes

@nicolasstucki nicolasstucki merged commit cea8a6f into scala:master Dec 15, 2020
@nicolasstucki nicolasstucki deleted the fix-#10697 branch December 15, 2020 17:20
@Kordyjan Kordyjan modified the milestones: 3.0.0-M3, 3.0.0 Aug 2, 2023
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.

decide on final context function syntax
4 participants