Hi, I have a pair of loops over a nested array object in scala
def populateBoard(data:Array[Array[Char]]) {
Board.resize(data(0).length, data.length)
for(y <- 0 to data.length-1) {
val row = data(y)
for(x <- 0 to row.length-1) {
Board.putObjectAt(x,y,GamePieceFactory.createInstance(row(x),x,y))
}
}
}
Which works just fine in the unit tests, but when I run the application I get the following exception:
java.lang.NoSuchMethodError: scala.runtime.RichInt.to(I)Lscala/Range;
at net.ceilingfish.pacman.App$.populateBoard(App.scala:37)
Line 37 is the line for(y <- 0 to data.length-1)
. Very odd. The unit tests run scala 2.6.1 and the command line is 2.7.7. Are there some backward incompatible changes between these two versions?
UPDATE I switched the unit tests to version 2.7.7 and they carried on working just fine. Even odder.