Scala collections import weirdness Follow
For some reason, the recent nightly builds of the Scala plugin now require collection imports to be qualified with "scala.collection".
Example:
import collection.generic.Addable
trait Foo extends Addable[Foo, Foo] {
// etc etc
}
Now Addable shows up as red and the Scala plugin suggests importing "scala.collection.generic.Addable", even through the code compiles just fine.
Interestingly enough, other top-level imports, like "reflect.BeanInfo" (which is really scala.reflect.BeanInfo) don't have this annoying tic.
Have I misconfigured something with my Scala facet? Does anyone else have this issue?
Please sign in to leave a comment.
Try:

import collection<cursor>._
CTRL-B
This should take you to the collection package.
If not, there is a chance you have a local variable or package in your own project in scope named 'collection', and you should browse to that point.
Thanks, retronymster, that was exactly the case. Someone added a com.test.whatever.collection package in a module that this module depends on - although it is strange that Idea should find the import ambiguous, because i am not importing com.test.whatever._ above.
This might be of interest:
http://stackoverflow.com/questions/2830248/what-are-nested-unnested-packages-in-scala-2-8