scala.* imports not being resolved
Upgraded to 0.26.327 today and now imports of the form scala.* are not being resolved. I narrowed the issue to use the of the "scala" package. For example:
scala.xml.NodeSeq
does not work, while
xml.NodeSeq
works as expected.
How can I get the old style of imports back?
请先登录再写评论。
Do you have somewhere in your project other package with name "scala"?
Best regards,
Alexander Podkhalyuzin.
An easy way to check for a name shadowing (usually) is:
object Foo {
scala
}
Inside, double click / select scala and press Cmd-B (OS X; on windows probably Ctrl-B). If you have given that name to a symbol visible from your package, it will bring you there. If not you could try to type `scala.` and see what the auto completion offers you. That way you may discover the use of the `scala` symbol in your package hierarchy.
I am currently doing some work on Scala Native and the packages start with scala.scalanative. So if we use a relative import counting on scala._ to be imported and use an import such as scalanative.posix._, the import will not resolve.
I am not sure why this is so because the code compiles fine. Could someone explain?