Why does a large array constructor call break the Scala compiler? Why does a large array constructor call break the Scala compiler? arrays arrays

Why does a large array constructor call break the Scala compiler?


Well I tried to reproduce your problem and newer scalac (2.11.7) has a better error message (hope it clears up the problem):

ยป scalac Arrays.scalaArrays.scala:1: error: Could not write class testCase because it exceeds JVM code size limits. Method <init>'s code too large!class testCase()  {      ^one error found

So it looks like, just like @Marius noted in comments, you're hitting "64K bytecode per method" limit imposed by JVM.