diff options
author | Sean McDirmid <sean.mcdirmid@gmail.com> | 2007-07-19 14:23:19 +0000 |
---|---|---|
committer | Sean McDirmid <sean.mcdirmid@gmail.com> | 2007-07-19 14:23:19 +0000 |
commit | 63c0c73ba7df0c9ab59826dd004f06a91c669289 (patch) | |
tree | 1966c37b1fe3437e0c41a751c6369e0d838dfb6c /src | |
parent | 7c574439453b88d328d975845c2e55499b56bf14 (diff) | |
download | scala-63c0c73ba7df0c9ab59826dd004f06a91c669289.tar.gz scala-63c0c73ba7df0c9ab59826dd004f06a91c669289.tar.bz2 scala-63c0c73ba7df0c9ab59826dd004f06a91c669289.zip |
Fixed ++[B >: A] overload problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/mutable/ArrayBuffer.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library/scala/collection/mutable/ArrayBuffer.scala b/src/library/scala/collection/mutable/ArrayBuffer.scala index ad3e1eb6af..0a4856fcd2 100644 --- a/src/library/scala/collection/mutable/ArrayBuffer.scala +++ b/src/library/scala/collection/mutable/ArrayBuffer.scala @@ -42,6 +42,13 @@ class ArrayBuffer[A] extends RandomAccessSeq.Mutable[A] with Buffer[A] with Resi */ override def ++=(iter: Iterable[A]) { iter copyToBuffer this } + override def ++[B >: A](that: Iterable[B]) : ArrayBuffer[B] = { + val buf = new ArrayBuffer[B] + this copyToBuffer buf + that copyToBuffer buf + buf + } + /** Appends a number of elements in an array * * @param src the array |