Skip to content

Conversation

@adpi2
Copy link
Member

@adpi2 adpi2 commented Feb 15, 2021

Fixes #122

@adpi2 adpi2 force-pushed the case-class-companion branch from 14e30ea to 76b4cd2 Compare February 15, 2021 15:17
@adpi2 adpi2 requested a review from julienrf February 15, 2021 15:20
Copy link
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

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

Nice workaround, thanks Adrien!

@adpi2 adpi2 force-pushed the case-class-companion branch from 76b4cd2 to 0eb008a Compare February 16, 2021 07:50
@adpi2 adpi2 merged commit fb4dd54 into scalacenter:master Feb 16, 2021
@julienrf
Copy link
Contributor

I wonder if scala/scala3#7207 fixed the problem?

@julienrf
Copy link
Contributor

We will see after the migration to 3.0.0-RC1 if the incompatibility is still incompatible :)

@adpi2
Copy link
Member Author

adpi2 commented Feb 16, 2021

Apparently it does not fix the problem.

Indeed, all the incompatibilities in this repo, including this one are tested. We check that the scala-2.13/<incompat>.scala source file compiles in 2.13 but not in 3.0.0-M3. Also we check that the scala/<incompat>.scala source file compiles in both 2.13 and 3.0.0-M3.

I think the PR you mention allows to write this:

Foo.apply.tupled((1,true))
Foo.apply.curried(2)(false)

But this doesn't compile in 2.13 because the eta-expansion only occurs when a function type is expected.

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.

New incompatibility: case class companions don’t extend Function anymore

2 participants