diff options
author | Paul Phillips <paulp@improving.org> | 2011-07-11 20:39:43 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-07-11 20:39:43 +0000 |
commit | 4977341da76a9ac2bf329ef6f6eba4d824430e97 (patch) | |
tree | 14d8e88215a2341a4b9efff4e61929884b4b2861 /src | |
parent | 6cb88f36ff46e10fe904c8245d7a8466910db91b (diff) | |
download | scala-4977341da76a9ac2bf329ef6f6eba4d824430e97.tar.gz scala-4977341da76a9ac2bf329ef6f6eba4d824430e97.tar.bz2 scala-4977341da76a9ac2bf329ef6f6eba4d824430e97.zip |
Implemented workaround for SI-4789, no review.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/generic/GenTraversableFactory.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library/scala/collection/generic/GenTraversableFactory.scala b/src/library/scala/collection/generic/GenTraversableFactory.scala index 66eb57657b..34cbe1a7f2 100644 --- a/src/library/scala/collection/generic/GenTraversableFactory.scala +++ b/src/library/scala/collection/generic/GenTraversableFactory.scala @@ -38,9 +38,11 @@ abstract class GenTraversableFactory[CC[X] <: GenTraversable[X] with GenericTrav // A default implementation of GenericCanBuildFrom which can be cast // to whatever is desired. - private[collection] object ReusableCBF extends GenericCanBuildFrom[Nothing] { + private class ReusableCBF extends GenericCanBuildFrom[Nothing] { override def apply() = newBuilder[Nothing] } + // Working around SI-4789 by using a lazy val instead of an object. + lazy val ReusableCBF: GenericCanBuildFrom[Nothing] = new ReusableCBF /** A generic implementation of the `CanBuildFrom` trait, which forwards * all calls to `apply(from)` to the `genericBuilder` method of |