Multidimensional array declaration ends after updating Eclipse Juno with Scala 2.10

I recently updated Eclipse Juno and therefore to Scala 2.10. I had code that worked fine before, but after updating, I get the error "too many arguments for the Array constructor" for this line:

var labyrinth = new Array[Array[Cell]](lines.length, lines.apply(0).length); 

It should be a two-dimensional array. I wonder what the problem is, since it worked before. When I run the project (ignoring the error), it does not compile, and it gives me a "class not found" exception.

I am running Eclipse Juno with Scala 2.10 on OSX Lion.

+4
source share
1 answer

Creating arrays using the constructor has been depreacted since scala 2.8 . Instead, use Array.ofDim[Cell](lines.length, lines.apply(0).length) .

+6
source

All Articles