diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/mutable/ListBuffer.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library/scala/collection/mutable/ListBuffer.scala b/src/library/scala/collection/mutable/ListBuffer.scala index 415096ed89..55629fe523 100644 --- a/src/library/scala/collection/mutable/ListBuffer.scala +++ b/src/library/scala/collection/mutable/ListBuffer.scala @@ -123,6 +123,12 @@ final class ListBuffer[A] this } + override def ++=(xs: TraversableOnce[A]): this.type = + if (xs eq this) ++= (this take size) else super.++=(xs) + + override def ++=:(xs: TraversableOnce[A]): this.type = + if (xs eq this) ++=: (this take size) else super.++=(xs) + /** Clears the buffer contents. */ def clear() { |