diff options
author | Paul Phillips <paulp@improving.org> | 2011-09-03 04:16:07 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-09-03 04:16:07 +0000 |
commit | 6817244d64fca81810e6e45f8a4ea53e9e6d76c2 (patch) | |
tree | 94d39491db9d7c68ef9f20238ac7b327dd96b871 | |
parent | 13f30c385b442eb702d257c707e722963391f513 (diff) | |
download | scala-6817244d64fca81810e6e45f8a4ea53e9e6d76c2.tar.gz scala-6817244d64fca81810e6e45f8a4ea53e9e6d76c2.tar.bz2 scala-6817244d64fca81810e6e45f8a4ea53e9e6d76c2.zip |
Removed the type parameter from sliding, no rev...
Removed the type parameter from sliding, no review.
4 files changed, 7 insertions, 7 deletions
diff --git a/src/library/scala/collection/IterableLike.scala b/src/library/scala/collection/IterableLike.scala index e5aa381c9f..4b0c5662d8 100644 --- a/src/library/scala/collection/IterableLike.scala +++ b/src/library/scala/collection/IterableLike.scala @@ -172,8 +172,8 @@ self => * last and the only element will be truncated if there are * fewer elements than size. */ - def sliding[B >: A](size: Int): Iterator[Repr] = sliding(size, 1) - def sliding[B >: A](size: Int, step: Int): Iterator[Repr] = + def sliding(size: Int): Iterator[Repr] = sliding(size, 1) + def sliding(size: Int, step: Int): Iterator[Repr] = for (xs <- iterator.sliding(size, step)) yield { val b = newBuilder b ++= xs diff --git a/src/library/scala/collection/IterableProxyLike.scala b/src/library/scala/collection/IterableProxyLike.scala index 0fe501ac6b..a2a7a42d62 100644 --- a/src/library/scala/collection/IterableProxyLike.scala +++ b/src/library/scala/collection/IterableProxyLike.scala @@ -27,8 +27,8 @@ trait IterableProxyLike[+A, +Repr <: IterableLike[A, Repr] with Iterable[A]] with TraversableProxyLike[A, Repr] { override def iterator: Iterator[A] = self.iterator override def grouped(size: Int): Iterator[Repr] = self.grouped(size) - override def sliding[B >: A](size: Int): Iterator[Repr] = self.sliding(size) - override def sliding[B >: A](size: Int, step: Int): Iterator[Repr] = self.sliding(size, step) + override def sliding(size: Int): Iterator[Repr] = self.sliding(size) + override def sliding(size: Int, step: Int): Iterator[Repr] = self.sliding(size, step) override def takeRight(n: Int): Repr = self.takeRight(n) override def dropRight(n: Int): Repr = self.dropRight(n) override def zip[A1 >: A, B, That](that: GenIterable[B])(implicit bf: CanBuildFrom[Repr, (A1, B), That]): That = self.zip[A1, B, That](that)(bf) diff --git a/src/library/scala/collection/IterableViewLike.scala b/src/library/scala/collection/IterableViewLike.scala index 70f4519204..df4710b1be 100644 --- a/src/library/scala/collection/IterableViewLike.scala +++ b/src/library/scala/collection/IterableViewLike.scala @@ -110,7 +110,7 @@ trait IterableViewLike[+A, override def grouped(size: Int): Iterator[This] = self.iterator grouped size map (x => newForced(x).asInstanceOf[This]) - override def sliding[B >: A](size: Int, step: Int): Iterator[This] = + override def sliding(size: Int, step: Int): Iterator[This] = self.iterator.sliding(size, step) map (x => newForced(x).asInstanceOf[This]) override def stringPrefix = "IterableView" diff --git a/src/library/scala/collection/interfaces/IterableMethods.scala b/src/library/scala/collection/interfaces/IterableMethods.scala index f6941c8961..2054922e59 100644 --- a/src/library/scala/collection/interfaces/IterableMethods.scala +++ b/src/library/scala/collection/interfaces/IterableMethods.scala @@ -27,8 +27,8 @@ trait IterableMethods[+A, +This <: IterableLike[A, This] with Iterable[A]] exten def dropRight(n: Int): Iterable[A] def grouped(size: Int): Iterator[Iterable[A]] def sameElements[B >: A](that: GenIterable[B]): Boolean - def sliding[B >: A](size: Int): Iterator[Iterable[A]] - def sliding[B >: A](size: Int, step: Int): Iterator[Iterable[A]] + def sliding(size: Int): Iterator[Iterable[A]] + def sliding(size: Int, step: Int): Iterator[Iterable[A]] def takeRight(n: Int): Iterable[A] def zipAll[B, A1 >: A, That](that: GenIterable[B], e1: A1, e2: B)(implicit bf: CanBuildFrom[This, (A1, B), That]): That def zipWithIndex[A1 >: A, That](implicit bf: CanBuildFrom[This, (A1, Int), That]): That |