fastparse
fastparse copied to clipboard
Mention fix for scala 2.13.7
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: https://github.com/scala/scala/pull/9712
But maybe the docs here could be updated showing how to fix these?
@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?
Under -Xsource:3 it's a failure, as per scala/scala#9712
Replace the _ with any old identifier. The documentation should change, though.