Asssume that there are two jars(or modules) framework and framework_extension,
and you first defined type DefaultController
in framework.
You can redefine DefaultController
in framework, using package objects.
Though, when DefaultController
is redefined like that,
the following code is red.
package application
import framework.controller._
//This also does not resolve DefaultController.
//import framework.controller.DefaultController
// 'DefaultController' is red.
object Foos extends DefaultController {
// 'bar' is red.
def test = bar
}
object TestApp {
def main(args: Array[String]) {
println(Foos.test)
}
}