diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-03-24 16:01:44 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-03-24 16:01:44 +0000 |
commit | 78e8d1aef2aeb544630f8c87186448f5709ac6f0 (patch) | |
tree | 5c6efb85b1818a0f952d74b95b2249f458c6faa9 /src | |
parent | 48eef965566b9f1ac4cc8a7c37acccad82ac8b13 (diff) | |
download | scala-78e8d1aef2aeb544630f8c87186448f5709ac6f0.tar.gz scala-78e8d1aef2aeb544630f8c87186448f5709ac6f0.tar.bz2 scala-78e8d1aef2aeb544630f8c87186448f5709ac6f0.zip |
Removed Iterable.toArray; it conflicts with Bit...
Removed Iterable.toArray; it conflicts with BitSet.toArray
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/Iterable.scala | 10 | ||||
-rw-r--r-- | src/library/scala/Seq.scala | 2 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/library/scala/Iterable.scala b/src/library/scala/Iterable.scala index 4319157989..ab735f9145 100644 --- a/src/library/scala/Iterable.scala +++ b/src/library/scala/Iterable.scala @@ -340,16 +340,6 @@ trait Iterable[+A] { def toList: List[A] = elements.toList - /** - * Creates an array with the elements of this iterable, - * in the order the iterable provides them. - */ - def toArray[B >: A]: Array[B] = { - val result = new ArrayBuffer[B] - result ++ this - result.toArray - } - /** Returns a string representation of this iterable object. The resulting string * begins with the string <code>start</code> and is finished by the string * <code>end</code>. Inside, the string representations of elements (w.r.t. diff --git a/src/library/scala/Seq.scala b/src/library/scala/Seq.scala index 948f29bb71..18228584f1 100644 --- a/src/library/scala/Seq.scala +++ b/src/library/scala/Seq.scala @@ -246,7 +246,7 @@ trait Seq[+A] extends AnyRef with PartialFunction[Int, A] with Iterable[A] { /** Converts this sequence to a fresh Array with <code>length</code> * elements. */ - override def toArray[B >: A]: Array[B] = { + def toArray[B >: A]: Array[B] = { val result = new Array[B](length) copyToArray(result, 0) result |