object Test extends Application { class X[T] { val a = new Array[Array[T]](3,4) } val x = new X[String] x.a(1)(2) = "hello" assert(x.a(1)(2) == "hello") }