Skip to content

Commit 78d1d31

Browse files
committed
Lint dubious overload differs only in implicit
1 parent 403dd83 commit 78d1d31

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

library/src/scala/jdk/DoubleAccumulator.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import java.util.Spliterator
1717
import java.util.function.{Consumer, DoubleConsumer}
1818
import java.{lang => jl}
1919

20+
import scala.annotation._
2021
import scala.collection.Stepper.EfficientSplit
2122
import scala.collection.{AnyStepper, DoubleStepper, Factory, SeqFactory, Stepper, StepperShape, mutable}
2223
import scala.language.implicitConversions
@@ -236,6 +237,7 @@ final class DoubleAccumulator
236237
}
237238

238239
/** Copies the elements in this `DoubleAccumulator` into an `Array[Double]` */
240+
@nowarn // cat=lint-overload see toArray[B: ClassTag]
239241
def toArray: Array[Double] = {
240242
if (totalSize > Int.MaxValue) throw new IllegalArgumentException("Too many elements accumulated for an array: "+totalSize.toString)
241243
val a = new Array[Double](totalSize.toInt)

library/src/scala/jdk/IntAccumulator.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import java.util.Spliterator
1717
import java.util.function.{Consumer, IntConsumer}
1818
import java.{lang => jl}
1919

20+
import scala.annotation._
2021
import scala.collection.Stepper.EfficientSplit
2122
import scala.collection.{AnyStepper, Factory, IntStepper, SeqFactory, Stepper, StepperShape, mutable}
2223
import scala.language.implicitConversions
@@ -241,6 +242,7 @@ final class IntAccumulator
241242
}
242243

243244
/** Copies the elements in this `IntAccumulator` into an `Array[Int]` */
245+
@nowarn // cat=lint-overload see toArray[B: ClassTag]
244246
def toArray: Array[Int] = {
245247
if (totalSize > Int.MaxValue) throw new IllegalArgumentException("Too many elements accumulated for an array: "+totalSize.toString)
246248
val a = new Array[Int](totalSize.toInt)

library/src/scala/jdk/LongAccumulator.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import java.util.Spliterator
1717
import java.util.function.{Consumer, LongConsumer}
1818
import java.{lang => jl}
1919

20+
import scala.annotation._
2021
import scala.collection.Stepper.EfficientSplit
2122
import scala.collection.{AnyStepper, Factory, LongStepper, SeqFactory, Stepper, StepperShape, mutable}
2223
import scala.language.implicitConversions
@@ -236,6 +237,7 @@ final class LongAccumulator
236237
}
237238

238239
/** Copies the elements in this `LongAccumulator` into an `Array[Long]` */
240+
@nowarn // cat=lint-overload see toArray[B: ClassTag]
239241
def toArray: Array[Long] = {
240242
if (totalSize > Int.MaxValue) throw new IllegalArgumentException("Too many elements accumulated for an array: "+totalSize.toString)
241243
val a = new Array[Long](totalSize.toInt)

0 commit comments

Comments
 (0)