Thursday, February 2, 2012

Scala : Accessing Trait Inner Class

For example you have:-


package test

trait A {
  class B {

  }
}


You can use test.A#B to access class B in other class, for example:-


import test.A
type B = A#B
val b = new B