Implemented workaround for SI-4789, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25266 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
extempore 2011-07-11 20:39:43 +00:00
parent 88879a9d4a
commit 3190280d30
1 changed files with 3 additions and 1 deletions

View File

@ -38,9 +38,11 @@ abstract class GenTraversableFactory[CC[X] <: GenTraversable[X] with GenericTrav
// A default implementation of GenericCanBuildFrom which can be cast // A default implementation of GenericCanBuildFrom which can be cast
// to whatever is desired. // to whatever is desired.
private[collection] object ReusableCBF extends GenericCanBuildFrom[Nothing] { private class ReusableCBF extends GenericCanBuildFrom[Nothing] {
override def apply() = newBuilder[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 /** A generic implementation of the `CanBuildFrom` trait, which forwards
* all calls to `apply(from)` to the `genericBuilder` method of * all calls to `apply(from)` to the `genericBuilder` method of