Skip to content

Commit

Permalink
Backports library changes related to SI-6566 from a419799
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
huitseeker committed Jan 13, 2014
1 parent 97b9b2c commit 806b6e4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/library/scala/collection/TraversableLike.scala
Expand Up @@ -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,
Expand Down
Expand Up @@ -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]]

Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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]]

Expand Down
2 changes: 1 addition & 1 deletion src/library/scala/collection/immutable/TrieIterator.scala
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/library/scala/collection/parallel/ParSeqLike.scala
Expand Up @@ -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.
Expand Down

0 comments on commit 806b6e4

Please sign in to comment.