@@ -492,12 +492,11 @@ final class ArrayOps[A](val xs: Array[A]) extends AnyVal {
492
492
/** Finds index of first occurrence of some value in this array after or at some start index.
493
493
*
494
494
* @param elem the element value to search for.
495
- * @tparam B the type of the element `elem`.
496
495
* @param from the start index
497
496
* @return the index `>= from` of the first element of this array that is equal (as determined by `==`)
498
497
* to `elem`, or `-1`, if none exists.
499
498
*/
500
- def indexOf [ B >: A ] (elem : B , from : Int = 0 ): Int = {
499
+ def indexOf (elem : A , from : Int = 0 ): Int = {
501
500
var i = from
502
501
while (i < xs.length) {
503
502
if (elem == xs(i)) return i
@@ -526,11 +525,10 @@ final class ArrayOps[A](val xs: Array[A]) extends AnyVal {
526
525
*
527
526
* @param elem the element value to search for.
528
527
* @param end the end index.
529
- * @tparam B the type of the element `elem`.
530
528
* @return the index `<= end` of the last element of this array that is equal (as determined by `==`)
531
529
* to `elem`, or `-1`, if none exists.
532
530
*/
533
- def lastIndexOf [ B >: A ] (elem : B , end : Int = xs.length - 1 ): Int = {
531
+ def lastIndexOf (elem : A , end : Int = xs.length - 1 ): Int = {
534
532
var i = min(end, xs.length- 1 )
535
533
while (i >= 0 ) {
536
534
if (elem == xs(i)) return i
@@ -1030,7 +1028,7 @@ final class ArrayOps[A](val xs: Array[A]) extends AnyVal {
1030
1028
* @return `true` if this array has an element that is equal (as
1031
1029
* determined by `==`) to `elem`, `false` otherwise.
1032
1030
*/
1033
- def contains [ A1 >: A ] (elem : A1 ): Boolean = exists (_ == elem)
1031
+ def contains (elem : A ): Boolean = exists (_ == elem)
1034
1032
1035
1033
/** Returns a copy of this array with patched values.
1036
1034
* Patching at negative indices is the same as patching starting at 0.
0 commit comments