diff options
author | François Garillot <francois@garillot.net> | 2014-01-07 17:22:11 +0100 |
---|---|---|
committer | François Garillot <francois@garillot.net> | 2014-01-13 12:03:31 +0100 |
commit | 806b6e412b718a7f222dbb423e8e9744e8f2b400 (patch) | |
tree | 9365c17bea0b4f13c97cdf76d28e47d3610a4277 /src | |
parent | 97b9b2c06a5f562b749eb34834096118f21ca843 (diff) | |
download | scala-806b6e412b718a7f222dbb423e8e9744e8f2b400.tar.gz scala-806b6e412b718a7f222dbb423e8e9744e8f2b400.tar.bz2 scala-806b6e412b718a7f222dbb423e8e9744e8f2b400.zip |
Backports library changes related to SI-6566 from a419799
The idea of backporting this occured while developing the -source flag
for SI-8126 : withouth this the library breaks at refchecks for a
Scala compiler that checks type aliases variance.
This shoudl be BC and promote good hygiene.
Diffstat (limited to 'src')
6 files changed, 6 insertions, 6 deletions
diff --git a/src/library/scala/collection/TraversableLike.scala b/src/library/scala/collection/TraversableLike.scala index 5f193eb211..8b430ca3d2 100644 --- a/src/library/scala/collection/TraversableLike.scala +++ b/src/library/scala/collection/TraversableLike.scala @@ -77,7 +77,7 @@ trait TraversableLike[+A, +Repr] extends Any import Traversable.breaks._ /** The type implementing this traversable */ - protected type Self = Repr + protected[this] type Self = Repr /** The collection of type $coll underlying this `TraversableLike` object. * By default this is implemented as the `TraversableLike` object itself, diff --git a/src/library/scala/collection/generic/GenericClassTagCompanion.scala b/src/library/scala/collection/generic/GenericClassTagCompanion.scala index a587bbf544..76c12d118e 100644 --- a/src/library/scala/collection/generic/GenericClassTagCompanion.scala +++ b/src/library/scala/collection/generic/GenericClassTagCompanion.scala @@ -19,7 +19,7 @@ import scala.reflect.ClassTag * @author Aleksandar Prokopec */ abstract class GenericClassTagCompanion[+CC[X] <: Traversable[X]] { - type Coll = CC[_] + protected[this] type Coll = CC[_] def newBuilder[A](implicit ord: ClassTag[A]): Builder[A, CC[A]] diff --git a/src/library/scala/collection/generic/GenericCompanion.scala b/src/library/scala/collection/generic/GenericCompanion.scala index 5b03f8e5c6..b966ce51db 100644 --- a/src/library/scala/collection/generic/GenericCompanion.scala +++ b/src/library/scala/collection/generic/GenericCompanion.scala @@ -24,7 +24,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 diff --git a/src/library/scala/collection/generic/GenericOrderedCompanion.scala b/src/library/scala/collection/generic/GenericOrderedCompanion.scala index a9a50a1c35..094912c75a 100644 --- a/src/library/scala/collection/generic/GenericOrderedCompanion.scala +++ b/src/library/scala/collection/generic/GenericOrderedCompanion.scala @@ -19,7 +19,7 @@ import scala.language.higherKinds * @since 2.8 */ abstract class GenericOrderedCompanion[+CC[X] <: Traversable[X]] { - type Coll = CC[_] + protected[this] type Coll = CC[_] def newBuilder[A](implicit ord: Ordering[A]): Builder[A, CC[A]] diff --git a/src/library/scala/collection/immutable/TrieIterator.scala b/src/library/scala/collection/immutable/TrieIterator.scala index ae427852d4..b0bd253359 100644 --- a/src/library/scala/collection/immutable/TrieIterator.scala +++ b/src/library/scala/collection/immutable/TrieIterator.scala @@ -46,7 +46,7 @@ private[collection] abstract class TrieIterator[+T](elems: Array[Iterable[T]]) e case x: HashSetCollision1[_] => x.ks.map(x => HashSet(x)).toArray }).asInstanceOf[Array[Iterable[T]]] - private type SplitIterators = ((Iterator[T], Int), Iterator[T]) + private[this] type SplitIterators = ((Iterator[T], Int), Iterator[T]) private def isTrie(x: AnyRef) = x match { case _: HashTrieMap[_,_] | _: HashTrieSet[_] => true diff --git a/src/library/scala/collection/parallel/ParSeqLike.scala b/src/library/scala/collection/parallel/ParSeqLike.scala index 201b624c72..da9abfcf5c 100644 --- a/src/library/scala/collection/parallel/ParSeqLike.scala +++ b/src/library/scala/collection/parallel/ParSeqLike.scala @@ -45,7 +45,7 @@ extends scala.collection.GenSeqLike[T, Repr] with ParIterableLike[T, Repr, Sequential] { self => - type SuperParIterator = IterableSplitter[T] + protected[this] type SuperParIterator = IterableSplitter[T] /** A more refined version of the iterator found in the `ParallelIterable` trait, * this iterator can be split into arbitrary subsets of iterators. |