문제

I recently updated to Eclipse Juno and therefore to Scala 2.10 as well. I had code that worked perfectly before, however, after the update I get a "too many arguments for constructor Array" error for this line:

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

It should represent a two-dimensional array. I wonder what the problem is, since it's been working before. When I run the project (ignoring the error) it doesn't compile and it gives me a "class not found" exception.

I'm running Eclipse Juno with Scala 2.10 on OSX Lion.

도움이 되었습니까?

해결책

Creating arrays with constructor was depreacted since scala 2.8. You should use Array.ofDim[Cell](lines.length, lines.apply(0).length) instead.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top