I want to import java inner class into Scala project. The code, which wouldn't compile looks like this:
import pac.Obj
import pac.Obj.Inner.Inner2
object Sample {
def main(args: Array[String]): Unit = {
var o = new Obj()
Inner2 i2 = o.getInner().addInner2("some text")
}
}
The scala compiler is unable to recognize the second import. Why is that? In Java, this construct works fine.