diff options
author | Paul Phillips <paulp@improving.org> | 2012-08-16 16:46:15 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-08-16 16:46:42 -0700 |
commit | 0fc0038e33b629efcaa0aa314b0e69419c116777 (patch) | |
tree | 51ea2b053fac4495305c92e5d34677a3563af471 /src/library/scala/collection/IndexedSeq.scala | |
parent | 0308ae88026a4a8d427d1a9156c31c0ff8dd2561 (diff) | |
download | scala-0fc0038e33b629efcaa0aa314b0e69419c116777.tar.gz scala-0fc0038e33b629efcaa0aa314b0e69419c116777.tar.bz2 scala-0fc0038e33b629efcaa0aa314b0e69419c116777.zip |
Modified SI-6150 fix to use intended ReusableCBF.
I also realized it didn't have to be lazy, and made it so.
Diffstat (limited to 'src/library/scala/collection/IndexedSeq.scala')
-rw-r--r-- | src/library/scala/collection/IndexedSeq.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/library/scala/collection/IndexedSeq.scala b/src/library/scala/collection/IndexedSeq.scala index 4d1758fdd3..39be1f7a9e 100644 --- a/src/library/scala/collection/IndexedSeq.scala +++ b/src/library/scala/collection/IndexedSeq.scala @@ -29,9 +29,12 @@ trait IndexedSeq[+A] extends Seq[A] * @define Coll `IndexedSeq` */ object IndexedSeq extends SeqFactory[IndexedSeq] { - override lazy val ReusableCBF: GenericCanBuildFrom[Nothing] = new ReusableCBF - - implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, IndexedSeq[A]] = IndexedSeq.ReusableCBF.asInstanceOf[GenericCanBuildFrom[A]] + override val ReusableCBF: GenericCanBuildFrom[Nothing] = new GenericCanBuildFrom[Nothing] { + override def apply() = newBuilder[Nothing] + } + implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, IndexedSeq[A]] = + ReusableCBF.asInstanceOf[GenericCanBuildFrom[A]] + def newBuilder[A]: Builder[A, IndexedSeq[A]] = immutable.IndexedSeq.newBuilder[A] } |