You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use a java library that returns a Vector, then use JavaConverters 'asScala' to convert the vector to the Scala equivalent and then try to match on the type in flatMap to do processing, I get a compiler crash.
no-symbol does not have an owner
This worked in Scala 2.9, but it hasn't worked in any version of 2.10.
Code would be something like this:
channel.ls.asScala.filter( _ match .flatMap( _ match {
case e: LsEntry => Some(rootPath + "/" + e.getFilename)
case s => None
})
}
If I add channel.ls.asInstanceOf[Vector[LsEntry]] to the code, the crash goes away.
Here is a very simple sbt project that demonstrates the problem.
When I use a java library that returns a Vector, then use JavaConverters 'asScala' to convert the vector to the Scala equivalent and then try to match on the type in flatMap to do processing, I get a compiler crash.
no-symbol does not have an owner
This worked in Scala 2.9, but it hasn't worked in any version of 2.10.
Code would be something like this:
channel.ls.asScala.filter( _ match .flatMap( _ match {
case e: LsEntry => Some(rootPath + "/" + e.getFilename)
case s => None
})
}
If I add channel.ls.asInstanceOf[Vector[LsEntry]] to the code, the crash goes away.
Here is a very simple sbt project that demonstrates the problem.
https://github.com/OleTraveler/non-symbol-error
The text was updated successfully, but these errors were encountered: