@@ -14,14 +14,13 @@ package scala.collection.compat
1414
1515import scala .reflect .ClassTag
1616import scala .collection .generic .CanBuildFrom
17- import scala .collection .mutable .Builder
1817import scala .collection .{immutable => i , mutable => m }
1918
2019/* builder optimized for a single ++= call, which returns identity on result if possible
2120 * and defers to the underlying builder if not.
2221 */
23- private final class IdentityPreservingBuilder [A , CC [X ] <: TraversableOnce [X ]](that : Builder [A , CC [A ]])(implicit ct : ClassTag [CC [A ]])
24- extends Builder [A , CC [A ]] {
22+ private final class IdentityPreservingBuilder [A , CC [X ] <: TraversableOnce [X ]](that : m. Builder [A , CC [A ]])(implicit ct : ClassTag [CC [A ]])
23+ extends m. Builder [A , CC [A ]] {
2524
2625 // invariant: ruined => (collection == null)
2726 var collection : CC [A ] = null .asInstanceOf [CC [A ]]
@@ -62,9 +61,9 @@ private final class IdentityPreservingBuilder[A, CC[X] <: TraversableOnce[X]](th
6261}
6362
6463private [compat] object CompatImpl {
65- def simpleCBF [A , C ](f : => Builder [A , C ]): CanBuildFrom [Any , A , C ] = new CanBuildFrom [Any , A , C ] {
66- def apply (from : Any ): Builder [A , C ] = apply()
67- def apply (): Builder [A , C ] = f
64+ def simpleCBF [A , C ](f : => m. Builder [A , C ]): CanBuildFrom [Any , A , C ] = new CanBuildFrom [Any , A , C ] {
65+ def apply (from : Any ): m. Builder [A , C ] = apply()
66+ def apply (): m. Builder [A , C ] = f
6867 }
6968
7069 type ImmutableBitSetCC [X ] = ({ type L [_] = i.BitSet })# L [X ]
0 commit comments