@@ -30,11 +30,17 @@ trait SeqViewOps[+A, +CC[_], +C] extends Any with IterableOps[A, CC, C] {
3030 def length : Int
3131 def apply (x : Int ): A
3232 def appended [B >: A ](elem : B ): CC [B ]^ {this }
33- def updated [B >: A ](index : Int , elem : B ): CC [B ]^ {this }
3433 def prepended [B >: A ](elem : B ): CC [B ]^ {this }
3534 def reverse : C ^ {this }
3635 def sorted [B >: A ](implicit ord : Ordering [B ]): C ^ {this }
3736
37+ // Placeholder implementation for that method in SeqOps.
38+ // This is needed due to the change in the class hierarchy in cc stdlib.
39+ // See #19660 and #19819.
40+ def updated [B >: A ](index : Int , elem : B ): CC [B ]^ {this } =
41+ assert(false , " This is a placeholder implementation in the capture checked Scala 2 library." )
42+ ???
43+
3844 def reverseIterator : Iterator [A ]^ {this } = reversed.iterator
3945}
4046
@@ -46,15 +52,6 @@ trait SeqView[+A] extends SeqViewOps[A, View, View[A]] with View[A] {
4652 override def map [B ](f : A => B ): SeqView [B ]^ {this , f} = new SeqView .Map (this , f)
4753 override def appended [B >: A ](elem : B ): SeqView [B ]^ {this } = new SeqView .Appended (this , elem)
4854
49- // Copied from SeqOps. This is needed due to the change of class hierarchy in stdlib.
50- // See #19660.
51- override def updated [B >: A ](index : Int , elem : B ): View [B ]^ {this } = {
52- if (index < 0 ) throw new IndexOutOfBoundsException (index.toString)
53- val k = knownSize
54- if (k >= 0 && index >= k) throw new IndexOutOfBoundsException (index.toString)
55- iterableFactory.from(new View .Updated (this , index, elem))
56- }
57-
5855 override def prepended [B >: A ](elem : B ): SeqView [B ]^ {this } = new SeqView .Prepended (elem, this )
5956 override def reverse : SeqView [A ]^ {this } = new SeqView .Reverse (this )
6057 override def take (n : Int ): SeqView [A ]^ {this } = new SeqView .Take (this , n)
0 commit comments