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

Mention fix for scala 2.13.7 #258

Closed
francisdb opened this issue Nov 2, 2021 · 4 comments
Closed

Mention fix for scala 2.13.7 #258

francisdb opened this issue Nov 2, 2021 · 4 comments

Comments

@francisdb
Copy link

francisdb commented Nov 2, 2021

Looks like all our fastparse definitions won't compile any more with scala 2.13.7

 identifier expected but '_' found.
[error]   private def wholeNumber[_: P]: P[Int] = P(CharIn("0-9").rep(1).!.map(_.toInt))

Our compiler flags:

      "-Xsource:3",
      "--target:11",
      "-feature",
      "-unchecked",
      "-deprecation",
      "-encoding",
      "UTF-8", // yes, this is 2 args
      "-language:existentials",
      "-language:higherKinds",
      "-language:implicitConversions",
      "-unchecked",
      "-Xlint:-unused,_"

something is mentioned here: scala/scala#9712

But maybe the docs here could be updated showing how to fix these?

@lihaoyi
Copy link
Member

lihaoyi commented Nov 2, 2021

@SethTisue IIRC we only made compilations fail when using eta expansion? Or did we make the use of underscore here a compile failure as well?

@SethTisue
Copy link
Contributor

Under -Xsource:3 it's a failure, as per scala/scala#9712

@bwbecker
Copy link

Replace the _ with any old identifier. The documentation should change, though.

@lihaoyi
Copy link
Member

lihaoyi commented Mar 27, 2023

The documentation has changed to $

@lihaoyi lihaoyi closed this as completed Mar 27, 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

No branches or pull requests

4 participants