[#594] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Lex | Martin | fixed | 2006-05-15 15:40:26.0 | |
subject | subArray | |||
code |
object Test { def main(args: Array[String]): Unit = { val array = Array("one", "two", "three") val firstTwo: Array[String] = array.subArray(0,2) for(val x <- firstTwo) Console.println(x) } } |
|||
what happened | Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; at Test$.main(subarray.scala:4) at Test.main(subarray.scala) |
|||
what expected | It should work fine, printing out "one" and then "two". | |||
[back to overview] |
Lex edited on 2006-05-15 16:04:49.0 |
Martin edited on 2006-05-16 12:37:25.0 |