Skip to content

Commit a4f009d

Browse files
Merge pull request #11368 from dotty-staging/remove-unnecessary-classtags
Remove unnecessary ClassTags
2 parents b3f302e + 7843d7e commit a4f009d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/src/scala/IArray.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ object opaques:
106106
genericArrayOps(arr).flatten
107107

108108
/** Folds the elements of this array using the specified associative binary operator. */
109-
extension [T](arr: IArray[T]) def fold[U >: T: ClassTag](z: U)(op: (U, U) => U): U =
109+
extension [T](arr: IArray[T]) def fold[U >: T](z: U)(op: (U, U) => U): U =
110110
genericArrayOps(arr).fold(z)(op)
111111

112112
/** Applies a binary operator to a start value and all elements of this array,
113113
* going left to right. */
114-
extension [T](arr: IArray[T]) def foldLeft[U: ClassTag](z: U)(op: (U, T) => U): U =
114+
extension [T](arr: IArray[T]) def foldLeft[U](z: U)(op: (U, T) => U): U =
115115
genericArrayOps(arr).foldLeft(z)(op)
116116

117117
/** Applies a binary operator to all elements of this array and a start value,
118118
* going right to left. */
119-
extension [T](arr: IArray[T]) def foldRight[U: ClassTag](z: U)(op: (T, U) => U): U =
119+
extension [T](arr: IArray[T]) def foldRight[U](z: U)(op: (T, U) => U): U =
120120
genericArrayOps(arr).foldRight(z)(op)
121121

122122
/** Tests whether a predicate holds for all elements of this array. */
@@ -219,7 +219,7 @@ object opaques:
219219

220220
/** Sorts this array according to the Ordering which results from transforming
221221
* an implicitly given Ordering with a transformation function. */
222-
extension [T](arr: IArray[T]) def sortBy[U: ClassTag](f: T => U)(using math.Ordering[U]): IArray[T] =
222+
extension [T](arr: IArray[T]) def sortBy[U](f: T => U)(using math.Ordering[U]): IArray[T] =
223223
genericArrayOps(arr).sortBy(f)
224224

225225
/** Sorts this array according to a comparison function. */
@@ -239,7 +239,7 @@ object opaques:
239239
genericArrayOps(arr).splitAt(n)
240240

241241
/** Tests whether this array starts with the given array. */
242-
extension [T](arr: IArray[T]) def startsWith[U >: T: ClassTag](that: IArray[U], offset: Int = 0): Boolean =
242+
extension [T](arr: IArray[T]) def startsWith[U >: T](that: IArray[U], offset: Int = 0): Boolean =
243243
genericArrayOps(arr).startsWith(that)
244244

245245
/** The rest of the array without its first element. */
@@ -269,7 +269,7 @@ object opaques:
269269
/** Returns an array formed from this array and another iterable collection
270270
* by combining corresponding elements in pairs.
271271
* If one of the two collections is longer than the other, its remaining elements are ignored. */
272-
extension [T](arr: IArray[T]) def zip[U: ClassTag](that: IArray[U]): IArray[(T, U)] =
272+
extension [T](arr: IArray[T]) def zip[U](that: IArray[U]): IArray[(T, U)] =
273273
genericArrayOps(arr).zip(that)
274274

275275
/** Conversion from IArray to immutable.ArraySeq */

0 commit comments

Comments
 (0)