diff options
Diffstat (limited to 'src/library/scala/collection/generic/GenericCompanion.scala')
-rw-r--r-- | src/library/scala/collection/generic/GenericCompanion.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/library/scala/collection/generic/GenericCompanion.scala b/src/library/scala/collection/generic/GenericCompanion.scala index 5b03f8e5c6..67d0a9c7f7 100644 --- a/src/library/scala/collection/generic/GenericCompanion.scala +++ b/src/library/scala/collection/generic/GenericCompanion.scala @@ -6,7 +6,8 @@ ** |/ ** \* */ -package scala.collection +package scala +package collection package generic import mutable.Builder @@ -24,7 +25,7 @@ import scala.language.higherKinds */ abstract class GenericCompanion[+CC[X] <: GenTraversable[X]] { /** The underlying collection type with unknown element type */ - type Coll = CC[_] + protected[this] type Coll = CC[_] /** The default builder for `$Coll` objects. * @tparam A the type of the ${coll}'s elements @@ -34,7 +35,7 @@ abstract class GenericCompanion[+CC[X] <: GenTraversable[X]] { /** An empty collection of type `$Coll[A]` * @tparam A the type of the ${coll}'s elements */ - def empty[A]: CC[A] = newBuilder[A].result + def empty[A]: CC[A] = newBuilder[A].result() /** Creates a $coll with the specified elements. * @tparam A the type of the ${coll}'s elements @@ -46,7 +47,7 @@ abstract class GenericCompanion[+CC[X] <: GenTraversable[X]] { else { val b = newBuilder[A] b ++= elems - b.result + b.result() } } } |