Skip to content

Commit 712dbe6

Browse files
committed
arrays of value classes: fix impl of def ++= (VCArrayBuilder)
1 parent dbfb4df commit 712dbe6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/dotty/runtime/vc/VCArrayBuilder.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ class VCArrayBuilder[T](implicit ct: ClassTag[T]) extends ArrayBuilder[T] {
4040
this
4141
}
4242

43-
override def ++=(xs: TraversableOnce[T]): this.type = (xs.asInstanceOf[AnyRef]) match {
44-
case xs: VCWrappedArray[_] =>
45-
ensureSize(this.size + xs.length)
46-
//TODO: check correctness
47-
Array.copy(xs.array, 0, elems, this.size, xs.length)
48-
size += xs.length
49-
this
50-
case _ =>
51-
super.++=(xs)
52-
}
43+
//use impl from Growable
44+
// override def ++=(xs: TraversableOnce[T]): this.type = (xs.asInstanceOf[AnyRef]) match {
45+
// case xs: VCWrappedArray[_] =>
46+
// ensureSize(this.size + xs.length)
47+
// Array.copy(xs.array, 0, elems, this.size, xs.length)
48+
// size += xs.length
49+
// this
50+
// case _ =>
51+
// super.++=(xs)
52+
// }
5353

5454
def clear() = {
5555
size = 0

0 commit comments

Comments
 (0)