code |
===
val a = Array(1, 2)
val b = Array(3, 4)
val p = a.projection +++ b.projection
Console.println(p)
===
throws java.lang.ArrayIndexOutOfBoundsException: 2
===
Index: RandomAccessSeq.scala
===================================================================
--- RandomAccessSeq.scala (revision 11112)
+++ RandomAccessSeq.scala (working copy)
@@ -54,6 +54,6 @@
def length = RandomAccessSeq.this.length + that.length
def apply(idx : Int) =
if (idx < RandomAccessSeq.this.length) RandomAccessSeq.this(idx)
- else that(idx)
+ else that(idx - RandomAccessSeq.this.length)
}
}
\ No newline at end of file
===
scala is 2.5.0.11112.20070521-181209 |