value | is not a member of String in Scala 2.10
See original GitHub issueIt seems that the ParserApi implicit does not get invoked in Scala 2.10. The same source code compiles with Scala 2.11.
Sample build.sbt:
scalaVersion := "2.10.6"
libraryDependencies += "com.lihaoyi" %% "fastparse" % "0.3.4"
Hello.scala:
import fastparse.all._
object Hello {
val t: P[String] = P("boo" | "bar")
}
sbt compile
:
[info] Compiling 1 Scala source to /tmp/fp/target/scala-2.10/classes...
[error] /tmp/fp/Hello.scala:4: value | is not a member of String
[error] val t: P[String] = P("boo" | "bar")
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 1 s, completed Dec 27, 2015 5:36:13 PM
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
value | is not a member of String in Scala 2.10 #72 - GitHub
It seems that the ParserApi implicit does not get invoked in Scala 2.10. The same source code compiles with Scala 2.11. Sample build.sbt:....
Read more >value should is not a member of String - Scala2.10
I get this error message while compiling specs for 2.10 only. 2.11 and 2.12 work fine: value should is not a member of...
Read more >`for` syntax failure for Either - Question - Scala Users
I'm using Scala 2.11.12. The following fails to compile, but if I attempt to desugar it myself, it works. for { x <-...
Read more >scala.collection.immutable.StringOps
This class serves as a wrapper providing scala.Predef.Strings with all the operations found in indexed sequences. Where needed, String s are implicitly ...
Read more >Why "value _1 is not a member of (("X" : String), ("Y"
The completed code as following: Welcome to Scala 3.1.0 (17.0.1, Java Java HotSpot(TM) 64-Bit Server VM). Type in expressions for evaluation ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue. I fixed it by including macro paradise as it does not come with Scala 2.10. Basically, for Scala 2.10.6 this works, for other versions of scala 2.10, tweaks may be needed:
Probably going to call this
wontfix
; most people should have upgraded to 2.11, and if you’re still on 2.10 upgrading is probably the higher priority