Skip to content

Commit 3158fe6

Browse files
authored
Drop redundant Pure parent traits in stdlib (#24149)
2 parents 5b02216 + bc0967c commit 3158fe6

File tree

7 files changed

+7
-14
lines changed

7 files changed

+7
-14
lines changed

library/src/scala/collection/IndexedSeq.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ import scala.math.Ordering
2424
/** Base trait for indexed sequences that have efficient `apply` and `length` */
2525
trait IndexedSeq[+A] extends Seq[A]
2626
with IndexedSeqOps[A, IndexedSeq, IndexedSeq[A]]
27-
with IterableFactoryDefaults[A, IndexedSeq]
28-
with caps.Pure {
27+
with IterableFactoryDefaults[A, IndexedSeq] {
2928
@nowarn("""cat=deprecation&origin=scala\.collection\.Iterable\.stringPrefix""")
3029
override protected[this] def stringPrefix: String = "IndexedSeq"
3130

library/src/scala/collection/SeqMap.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ import scala.annotation.nowarn
3232

3333
trait SeqMap[K, +V] extends Map[K, V]
3434
with MapOps[K, V, SeqMap, SeqMap[K, V]]
35-
with MapFactoryDefaults[K, V, SeqMap, Iterable]
36-
with caps.Pure {
35+
with MapFactoryDefaults[K, V, SeqMap, Iterable] {
3736
@nowarn("""cat=deprecation&origin=scala\.collection\.Iterable\.stringPrefix""")
3837
override protected[this] def stringPrefix: String = "SeqMap"
3938

library/src/scala/collection/immutable/ArraySeq.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ sealed abstract class ArraySeq[+A]
4141
with IndexedSeqOps[A, ArraySeq, ArraySeq[A]]
4242
with StrictOptimizedSeqOps[A, ArraySeq, ArraySeq[A]]
4343
with EvidenceIterableFactoryDefaults[A, ArraySeq, ClassTag]
44-
with Serializable
45-
with caps.Pure {
44+
with Serializable{
4645

4746
/** The tag of the element type. This does not have to be equal to the element type of this ArraySeq. A primitive
4847
* ArraySeq can be backed by an array of boxed values and a reference ArraySeq can be backed by an array of a supertype

library/src/scala/collection/immutable/Seq.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ object IndexedSeq extends SeqFactory.Delegate[IndexedSeq](Vector) {
122122
/** Base trait for immutable indexed Seq operations */
123123
transparent trait IndexedSeqOps[+A, +CC[B] <: caps.Pure, +C]
124124
extends SeqOps[A, CC, C]
125-
with collection.IndexedSeqOps[A, CC, C]
126-
with caps.Pure {
125+
with collection.IndexedSeqOps[A, CC, C] {
127126

128127
override def slice(from: Int, until: Int): C = {
129128
// since we are immutable we can just share the same collection

library/src/scala/collection/immutable/StrictOptimizedSeqOps.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ transparent trait StrictOptimizedSeqOps[+A, +CC[B] <: caps.Pure, +C]
2525
extends Any
2626
with SeqOps[A, CC, C]
2727
with collection.StrictOptimizedSeqOps[A, CC, C]
28-
with StrictOptimizedIterableOps[A, CC, C]
29-
with caps.Pure {
28+
with StrictOptimizedIterableOps[A, CC, C] {
3029

3130
override def distinctBy[B](f: A -> B): C = {
3231
if (lengthCompare(1) <= 0) coll

library/src/scala/collection/immutable/WrappedString.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ import scala.collection.mutable.{Builder, StringBuilder}
3737
@SerialVersionUID(3L)
3838
final class WrappedString(private val self: String) extends AbstractSeq[Char] with IndexedSeq[Char]
3939
with IndexedSeqOps[Char, IndexedSeq, WrappedString]
40-
with Serializable
41-
with caps.Pure {
40+
with Serializable {
4241

4342
def apply(i: Int): Char = self.charAt(i)
4443

library/src/scala/collection/mutable/IndexedSeq.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ object IndexedSeq extends SeqFactory.Delegate[IndexedSeq](ArrayBuffer)
2929

3030
transparent trait IndexedSeqOps[A, +CC[_] <: caps.Pure, +C <: AnyRef]
3131
extends scala.collection.IndexedSeqOps[A, CC, C]
32-
with SeqOps[A, CC, C]
33-
with caps.Pure {
32+
with SeqOps[A, CC, C] {
3433

3534
/** Modifies this $coll by applying a function to all elements of this $coll.
3635
*

0 commit comments

Comments
 (0)