I'm having trouble importing packages into package objects. It didn't seem to work in Eclipse and so I switched to intellij. At one point the feature seemed to be working and so I created package objects for most packages. Now it doesn't seem to be working at all. Here's a package object in file package.scala, the package file itself compiles fine:
package rStrat.rSwing
package testSw //Edited for clarity
object testSw
{
import rStrat._
import rSwing.topUI._
}
and here's a class file from the same module and package.
package rStrat.rSwing.testSw
object MainTest {
def main(args: Array[String])
{
val testApp = new AppWindow //Appwindow is a member of topUI
testApp.open
}
}
It works fine if I import the topUI package straight into the MainTest file. it makes no difference whether I try and import the whole package or a particular class. is this legal scala? Is the problem with the IDEs?
I'm using Scala 2.92 Final, Intellij 11.1.1, JDK 1.6.0_31, Eclipse 3.7.2