diff options
Diffstat (limited to 'test/files/run/t0421.scala')
-rw-r--r-- | test/files/run/t0421.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/files/run/t0421.scala b/test/files/run/t0421.scala index 91a2b0cb4a..b69373f341 100644 --- a/test/files/run/t0421.scala +++ b/test/files/run/t0421.scala @@ -1,7 +1,7 @@ // ticket #421 object Test extends Application { - def transpose[A](xss: Array[Array[A]]) = { + def transpose[A: ClassManifest](xss: Array[Array[A]]) = { for (i <- Array.range(0, xss(0).length)) yield for (xs <- xss) yield xs(i) } @@ -14,6 +14,8 @@ object Test extends Application { def matmul(xss: Array[Array[Double]], yss: Array[Array[Double]]) = { val ysst = transpose(yss) + val ysst1: Array[Array[Double]] = yss.transpose + assert(ysst.deep == ysst1.deep) for (xs <- xss) yield for (yst <- ysst) yield scalprod(xs, yst) |