Skip to content

Commit 5ea50ee

Browse files
committed
Fix some warnings under Scala >=3.4
These are automatic rewrites using `-rewrite -source:3.4-migration`
1 parent f5a5867 commit 5ea50ee

File tree

145 files changed

+584
-584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+584
-584
lines changed

algebra-core/src/main/scala/algebra/Priority.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sealed trait Priority[+P, +F] {
4444
case Fallback(y) => f2(y)
4545
}
4646

47-
def join[U >: P with F]: U =
47+
def join[U >: P & F]: U =
4848
fold(_.asInstanceOf[U])(_.asInstanceOf[U])
4949

5050
def bimap[P2, F2](f1: P => P2)(f2: F => F2): Priority[P2, F2] =

algebra-core/src/main/scala/algebra/ring/Additive.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ trait AdditiveSemigroup[@sp(Int, Long, Float, Double) A] extends Any with Serial
3838
if (n > 0) positiveSumN(a, n)
3939
else throw new IllegalArgumentException("Illegal non-positive exponent to sumN: %s".format(n))
4040

41-
protected[this] def positiveSumN(a: A, n: Int): A = {
41+
protected def positiveSumN(a: A, n: Int): A = {
4242
@tailrec def loop(b: A, k: Int, extra: A): A =
4343
if (k == 1) plus(b, extra)
4444
else {

algebra-core/src/main/scala/algebra/ring/Multiplicative.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ trait MultiplicativeSemigroup[@sp(Int, Long, Float, Double) A] extends Any with
3434
if (n > 0) positivePow(a, n)
3535
else throw new IllegalArgumentException("Illegal non-positive exponent to pow: %s".format(n))
3636

37-
protected[this] def positivePow(a: A, n: Int): A = {
37+
protected def positivePow(a: A, n: Int): A = {
3838
@tailrec def loop(b: A, k: Int, extra: A): A =
3939
if (k == 1) times(b, extra)
4040
else {

algebra-core/src/main/scala/algebra/ring/Signed.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ object Signed extends SignedFunctions[Signed] {
156156
def apply(i: Int): Sign =
157157
if (i == 0) Zero else if (i > 0) Positive else Negative
158158

159-
private val instance: CommutativeMonoid[Sign] with MultiplicativeCommutativeMonoid[Sign] with Eq[Sign] =
159+
private val instance: CommutativeMonoid[Sign] & MultiplicativeCommutativeMonoid[Sign] & Eq[Sign] =
160160
new CommutativeMonoid[Sign] with MultiplicativeCommutativeMonoid[Sign] with Eq[Sign] {
161161
def eqv(x: Sign, y: Sign): Boolean = x == y
162162
def empty: Sign = Positive

algebra-laws/shared/src/main/scala/algebra/laws/LatticeLaws.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ trait LatticeLaws[A] extends GroupLaws[A] {
9292
meet = Some(boundedSemilattice(A.meetSemilattice))
9393
)
9494

95-
def boundedJoinLattice(implicit A: Lattice[A] with BoundedJoinSemilattice[A]) = new LatticeProperties(
95+
def boundedJoinLattice(implicit A: Lattice[A] & BoundedJoinSemilattice[A]) = new LatticeProperties(
9696
name = "boundedJoinLattice",
9797
parents = Seq(boundedJoinSemilattice, lattice),
9898
join = Some(boundedSemilattice(A.joinSemilattice)),
9999
meet = Some(semilattice(A.meetSemilattice))
100100
)
101101

102-
def boundedMeetLattice(implicit A: Lattice[A] with BoundedMeetSemilattice[A]) = new LatticeProperties(
102+
def boundedMeetLattice(implicit A: Lattice[A] & BoundedMeetSemilattice[A]) = new LatticeProperties(
103103
name = "boundedMeetLattice",
104104
parents = Seq(boundedMeetSemilattice, lattice),
105105
join = Some(semilattice(A.joinSemilattice)),

algebra-laws/shared/src/main/scala/algebra/laws/LatticePartialOrderLaws.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ trait LatticePartialOrderLaws[A] extends Laws {
8080
"lteqv+one" -> forAll { (x: A) => x ?<= A.one }
8181
)
8282

83-
def boundedBelowLatticePartialOrder(implicit A: Lattice[A] with BoundedJoinSemilattice[A], P: PartialOrder[A]) =
83+
def boundedBelowLatticePartialOrder(implicit A: Lattice[A] & BoundedJoinSemilattice[A], P: PartialOrder[A]) =
8484
new LatticePartialOrderProperties(
8585
name = "boundedBelowLatticePartialOrder",
8686
parents = Seq(boundedJoinSemilatticePartialOrder, latticePartialOrder)
8787
)
8888

89-
def boundedAboveLatticePartialOrder(implicit A: Lattice[A] with BoundedMeetSemilattice[A], P: PartialOrder[A]) =
89+
def boundedAboveLatticePartialOrder(implicit A: Lattice[A] & BoundedMeetSemilattice[A], P: PartialOrder[A]) =
9090
new LatticePartialOrderProperties(
9191
name = "boundedAboveLatticePartialOrder",
9292
parents = Seq(boundedMeetSemilatticePartialOrder, latticePartialOrder)

algebra-laws/shared/src/main/scala/algebra/laws/OrderLaws.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,6 @@ trait OrderLaws[A] extends Laws {
243243
name: String,
244244
parent: Option[RuleSet],
245245
props: (String, Prop)*
246-
) extends DefaultRuleSet(name, parent, props: _*)
246+
) extends DefaultRuleSet(name, parent, props*)
247247

248248
}

algebra-laws/shared/src/main/scala/algebra/laws/RingLaws.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ trait RingLaws[A] extends GroupLaws[A] { self =>
6666
new nonZeroLaws.GroupProperties(
6767
name = props.name,
6868
parents = parents,
69-
props = props.props: _*
69+
props = props.props*
7070
)
7171

7272
implicit def Arb: Arbitrary[A]
@@ -398,7 +398,7 @@ trait RingLaws[A] extends GroupLaws[A] { self =>
398398

399399
object RingProperties {
400400
def fromParent(name: String, parent: RingProperties, props: (String, Prop)*) =
401-
new RingProperties(name, parent.al, parent.ml, Seq(parent), props: _*)
401+
new RingProperties(name, parent.al, parent.ml, Seq(parent), props*)
402402
}
403403

404404
class RingProperties(

algebra-laws/shared/src/test/scala/algebra/laws/LawTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class LawTests extends munit.DisciplineSuite {
141141

142142
{
143143
implicit val arbBitSet: Arbitrary[BitSet] =
144-
Arbitrary(arbitrary[List[Byte]].map(s => BitSet(s.map(_ & 0xff): _*)))
144+
Arbitrary(arbitrary[List[Byte]].map(s => BitSet(s.map(_ & 0xff)*)))
145145
checkAll("BitSet", LogicLaws[BitSet].generalizedBool)
146146
}
147147

algebra-laws/shared/src/test/scala/algebra/laws/Rat.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ object Rat {
121121
DistributiveLattice.minMax[Rat](using ratAlgebra)
122122

123123
// Is this horrible? Yes. Am I ashamed? Yes.
124-
private[this] def genNonZero: Gen[BigInt] =
124+
private def genNonZero: Gen[BigInt] =
125125
arbitrary[BigInt].flatMap { x =>
126126
if (x != 0) Gen.const(x)
127127
else genNonZero

alleycats-core/src/main/scala/alleycats/ReferentialEq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ trait ReferentialEq[A <: AnyRef] extends Eq[A] {
3232
}
3333

3434
object ReferentialEq {
35-
private[this] val referentialEq: Eq[AnyRef] = new ReferentialEq[AnyRef] {}
35+
private val referentialEq: Eq[AnyRef] = new ReferentialEq[AnyRef] {}
3636

3737
def apply[A <: AnyRef]: Eq[A] = referentialEq.asInstanceOf[Eq[A]]
3838
}

alleycats-core/src/main/scala/alleycats/SystemIdentityHash.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ trait SystemIdentityHash[A <: AnyRef] extends ReferentialEq[A] with Hash[A] {
3232
}
3333

3434
object SystemIdentityHash {
35-
private[this] val identityHash: Hash[AnyRef] = new SystemIdentityHash[AnyRef] {}
35+
private val identityHash: Hash[AnyRef] = new SystemIdentityHash[AnyRef] {}
3636

3737
def apply[A <: AnyRef]: Hash[A] = identityHash.asInstanceOf[Hash[A]]
3838
}

alleycats-laws/shared/src/main/scala/alleycats/laws/discipline/FlatMapRecTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ trait FlatMapRecTests[F[_]] extends Laws {
3535
new DefaultRuleSet(
3636
name = "flatMapTailRec",
3737
parent = None,
38-
"tailRecM consistent flatMap" -> forAll(laws.tailRecMConsistentFlatMap[A] _)
38+
"tailRecM consistent flatMap" -> forAll(laws.tailRecMConsistentFlatMap[A])
3939
)
4040
}
4141

alleycats-laws/shared/src/main/scala/alleycats/laws/discipline/ReferentialEqTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ trait ReferentialEqTests[A] extends Laws {
3636
new DefaultRuleSet(
3737
"referentialEq",
3838
None,
39-
"reflexivity eq" -> forAll(laws.reflexivityEq _),
40-
"symmetry eq" -> forAll(laws.symmetryEq _),
41-
"transitivity eq" -> forAll(laws.transitivityEq _)
39+
"reflexivity eq" -> forAll(laws.reflexivityEq),
40+
"symmetry eq" -> forAll(laws.symmetryEq),
41+
"transitivity eq" -> forAll(laws.transitivityEq)
4242
)
4343
}
4444
}

alleycats-laws/shared/src/main/scala/alleycats/laws/discipline/SystemIdentityHashTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ trait SystemIdentityHashTests[A] extends ReferentialEqTests[A] {
3636
new DefaultRuleSet(
3737
"systemIdentityHash",
3838
Some(eqv),
39-
"hash compatibility" -> forAll(laws.hashCompatibility _),
40-
"same as universal hash" -> forAll(laws.sameAsUniversalHash _),
39+
"hash compatibility" -> forAll(laws.hashCompatibility),
40+
"same as universal hash" -> forAll(laws.sameAsUniversalHash),
4141
"same as scala hashing" -> forAll((x: A, y: A) => laws.sameAsScalaHashing(x, y, hashA))
4242
)
4343
}

alleycats-laws/shared/src/test/scala/alleycats/tests/MapSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MapSuite extends AlleycatsSuite {
3434
checkAll("Map[Int, *]", ShortCircuitingTests[Map[Int, *]].traverseFilter[Int])
3535

3636
test("traverse is stack-safe") {
37-
val items = Map((0 until 100000).map { i => (i.toString, i) }: _*)
37+
val items = Map((0 until 100000).map { i => (i.toString, i) }*)
3838
val sumAll = Traverse[Map[String, *]]
3939
.traverse(items) { i => () => i }
4040
.apply()

bench/src/main/scala/cats/bench/StateTBench.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import org.openjdk.jmh.annotations._
3434
@BenchmarkMode(Array(Mode.Throughput))
3535
class StateTBench {
3636
@Param(Array("10"))
37-
var count: Int = _
37+
var count: Int = scala.compiletime.uninitialized
3838

3939
@Benchmark
4040
def single(): Long =

bench/src/main/scala/cats/bench/TraverseBench.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ class TraverseBench {
3838
val chainT: Traverse[Chain] = Traverse[Chain]
3939

4040
// the unit of CPU work per iteration
41-
private[this] val Work: Long = 10
41+
private val Work: Long = 10
4242

43-
private[this] case object Failure extends RuntimeException
43+
private case object Failure extends RuntimeException
4444

4545
@Param(Array("10000"))
46-
var length: Int = _
46+
var length: Int = scala.compiletime.uninitialized
4747

48-
var list: List[Int] = _
49-
var vector: Vector[Int] = _
50-
var chain: Chain[Int] = _
48+
var list: List[Int] = scala.compiletime.uninitialized
49+
var vector: Vector[Int] = scala.compiletime.uninitialized
50+
var chain: Chain[Int] = scala.compiletime.uninitialized
5151

5252
@Setup
5353
def setup(): Unit = {

core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
475475
* }}}
476476
*/
477477
final def toNem[T, U](implicit ev: A <:< (T, U), order: Order[T]): NonEmptyMap[T, U] =
478-
NonEmptyMap.fromMapUnsafe(SortedMap(toLazyList.map(ev): _*)(order.toOrdering))
478+
NonEmptyMap.fromMapUnsafe(SortedMap(toLazyList.map(ev)*)(order.toOrdering))
479479

480480
/**
481481
* Creates new `NonEmptySet`, similarly to List#toSet from scala standard library.
@@ -488,7 +488,7 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
488488
* }}}
489489
*/
490490
final def toNes[B >: A](implicit order: Order[B]): NonEmptySet[B] =
491-
NonEmptySet.of(head, tail: _*)
491+
NonEmptySet.of(head, tail*)
492492

493493
/**
494494
* Creates new `NonEmptyVector`, similarly to List#toVector from scala standard library.

core/src/main/scala-2.13+/cats/evidence/AsSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
package cats.evidence
2323

2424
private[evidence] trait AsSupport {
25-
@inline implicit def asFromPredef[A, B](implicit ev: A <:< B): A As B = {
25+
@inline implicit def asFromPredef[A, B](implicit ev: A <:< B): A `As` B = {
2626
// we need F to be covariant, and the type lambda loses that
2727
// if we write As[A, *]
2828
type F[+Z] = As[A, Z]

core/src/main/scala-2.13+/cats/evidence/IsSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
package cats.evidence
2323

2424
private[evidence] trait IsSupport {
25-
@inline implicit def isFromPredef[A, B](implicit ev: A =:= B): A Is B =
25+
@inline implicit def isFromPredef[A, B](implicit ev: A =:= B): A `Is` B =
2626
ev.substituteCo[Is[A, *]](Is.refl[A])
2727
}

core/src/main/scala/cats/Align.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ object Align extends ScalaVersionSpecificAlignInstances {
149149

150150
private[cats] def alignWithIterator[A, B, C](fa: Iterable[A], fb: Iterable[B])(f: Ior[A, B] => C): Iterator[C] =
151151
new Iterator[C] {
152-
private[this] val iterA = fa.iterator
153-
private[this] val iterB = fb.iterator
152+
private val iterA = fa.iterator
153+
private val iterB = fb.iterator
154154
def hasNext: Boolean = iterA.hasNext || iterB.hasNext
155155
def next(): C =
156156
f(

core/src/main/scala/cats/ApplicativeError.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ trait ApplicativeError[F[_], E] extends Applicative[F] {
196196
* having originally been included in the `MonadError` API and syntax.
197197
*/
198198
def adaptError[A](fa: F[A])(pf: PartialFunction[E, E]): F[A] =
199-
recoverWith(fa)(pf.andThen(raiseError[A] _))
199+
recoverWith(fa)(pf.andThen(raiseError[A]))
200200

201201
/**
202202
* Returns a new value that transforms the result of the source,

core/src/main/scala/cats/Eval.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ final case class Now[+A](value: A) extends Eval.Leaf[A] {
158158
* garbage collection.
159159
*/
160160
final class Later[+A](f: () => A) extends Eval.Leaf[A] {
161-
private[this] var thunk: () => A = f
161+
private var thunk: () => A = f
162162

163163
// The idea here is that `f` may have captured very large
164164
// structures, but produce a very small result. In this case, once

core/src/main/scala/cats/MonadError.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ trait MonadError[F[_], E] extends ApplicativeError[F, E] with Monad[F] {
126126
rethrow(flatTap(attempt(fa))(f))
127127

128128
override def adaptError[A](fa: F[A])(pf: PartialFunction[E, E]): F[A] =
129-
recoverWith(fa)(pf.andThen(raiseError[A] _))
129+
recoverWith(fa)(pf.andThen(raiseError[A]))
130130
}
131131

132132
object MonadError {

core/src/main/scala/cats/NotNull.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ object NotNull {
4242
* Since NotNull is just a marker trait with no functionality, it's safe to
4343
* reuse a single instance of it. This helps prevent unnecessary allocations.
4444
*/
45-
private[this] val singleton: NotNull[Any] = new NotNull[Any] {}
45+
private val singleton: NotNull[Any] = new NotNull[Any] {}
4646

47-
private[this] def ambiguousException: Exception =
47+
private def ambiguousException: Exception =
4848
new Exception(
4949
"An instance of NotNull[Null] was used. This should never happen. Both ambiguous NotNull[Null] instances should always be in scope if one of them is."
5050
)

core/src/main/scala/cats/SemigroupK.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ trait SemigroupK[F[_]] extends Serializable { self =>
146146
/**
147147
* Return `a` combined with itself more than once.
148148
*/
149-
protected[this] def repeatedCombineNK[A](a: F[A], n: Int): F[A] = {
149+
protected def repeatedCombineNK[A](a: F[A], n: Int): F[A] = {
150150
@tailrec def loop(b: F[A], k: Int, extra: F[A]): F[A] =
151151
if (k == 1) combineK(b, extra)
152152
else {

core/src/main/scala/cats/Show.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ object Show extends ScalaVersionSpecificShowInstances with ShowInstances {
7676
}
7777

7878
final case class ShowInterpolator(_sc: StringContext) extends AnyVal {
79-
def show(args: Shown*): String = _sc.s(args: _*)
79+
def show(args: Shown*): String = _sc.s(args*)
8080
}
8181

8282
implicit val catsContravariantForShow: Contravariant[Show] = new Contravariant[Show] {

core/src/main/scala/cats/data/AndThen.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ abstract private[data] class AndThenInstances0 extends AndThenInstances1 {
272272
implicit def catsDataMonadForAndThen[T]: Monad[AndThen[T, *]] =
273273
new Monad[AndThen[T, *]] {
274274
// Piggybacking on the instance for Function1
275-
private[this] val fn1 = instances.all.catsStdMonadForFunction1[T]
275+
private val fn1 = instances.all.catsStdMonadForFunction1[T]
276276

277277
def pure[A](x: A): AndThen[T, A] =
278278
AndThen(fn1.pure[A](x))
@@ -293,7 +293,7 @@ abstract private[data] class AndThenInstances0 extends AndThenInstances1 {
293293
implicit def catsDataContravariantMonoidalForAndThen[R: Monoid]: ContravariantMonoidal[AndThen[*, R]] =
294294
new ContravariantMonoidal[AndThen[*, R]] {
295295
// Piggybacking on the instance for Function1
296-
private[this] val fn1 = instances.all.catsStdContravariantMonoidalForFunction1[R]
296+
private val fn1 = instances.all.catsStdContravariantMonoidalForFunction1[R]
297297

298298
def unit: AndThen[Unit, R] =
299299
AndThen(fn1.unit)
@@ -313,7 +313,7 @@ abstract private[data] class AndThenInstances0 extends AndThenInstances1 {
313313
implicit val catsDataArrowForAndThen: ArrowChoice[AndThen] & CommutativeArrow[AndThen] =
314314
new ArrowChoice[AndThen] with CommutativeArrow[AndThen] {
315315
// Piggybacking on the instance for Function1
316-
private[this] val fn1 = instances.all.catsStdInstancesForFunction1
316+
private val fn1 = instances.all.catsStdInstancesForFunction1
317317

318318
def choose[A, B, C, D](f: AndThen[A, C])(g: AndThen[B, D]): AndThen[Either[A, B], Either[C, D]] =
319319
AndThen(fn1.choose(f)(g))

core/src/main/scala/cats/data/Chain.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,9 +1292,9 @@ object Chain extends ChainInstances with ChainCompanionCompat {
12921292
case _ => null: NonEmpty[A]
12931293
})
12941294

1295-
private[this] var c: NonEmpty[A] = self
1296-
private[this] var rights: List[NonEmpty[A]] = Nil
1297-
private[this] var currentIterator: Iterator[A] = null
1295+
private var c: NonEmpty[A] = self
1296+
private var rights: List[NonEmpty[A]] = Nil
1297+
private var currentIterator: Iterator[A] = null
12981298

12991299
override def hasNext: Boolean = (c ne null) || ((currentIterator ne null) && currentIterator.hasNext)
13001300

@@ -1345,9 +1345,9 @@ object Chain extends ChainInstances with ChainCompanionCompat {
13451345
case _ => null: NonEmpty[A]
13461346
})
13471347

1348-
private[this] var c: NonEmpty[A] = self
1349-
private[this] var lefts: List[NonEmpty[A]] = Nil
1350-
private[this] var currentIterator: Iterator[A] = null
1348+
private var c: NonEmpty[A] = self
1349+
private var lefts: List[NonEmpty[A]] = Nil
1350+
private var currentIterator: Iterator[A] = null
13511351

13521352
override def hasNext: Boolean = (c ne null) || ((currentIterator ne null) && currentIterator.hasNext)
13531353

@@ -1612,7 +1612,7 @@ sealed abstract private[data] class ChainInstances extends ChainInstances1 {
16121612

16131613
}
16141614

1615-
private[this] val theMonoid: Monoid[Chain[Any]] = new Monoid[Chain[Any]] {
1615+
private val theMonoid: Monoid[Chain[Any]] = new Monoid[Chain[Any]] {
16161616
def empty: Chain[Any] = Chain.nil
16171617

16181618
def combine(c: Chain[Any], c2: Chain[Any]): Chain[Any] = Chain.concat(c, c2)

core/src/main/scala/cats/data/Const.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ sealed abstract private[data] class ConstInstances extends ConstInstances0 {
9696
override def minBound: Const[A, B] = Const(A.minBound)
9797
}
9898

99-
implicit def catsDataOrderForConst[A: Order, B]: Order[Const[A, B]] = _ compare _
99+
implicit def catsDataOrderForConst[A: Order, B]: Order[Const[A, B]] = _ `compare` _
100100

101-
implicit def catsDataPartialOrderForConst[A: PartialOrder, B]: PartialOrder[Const[A, B]] = _ partialCompare _
101+
implicit def catsDataPartialOrderForConst[A: PartialOrder, B]: PartialOrder[Const[A, B]] = _ `partialCompare` _
102102

103103
implicit def catsDataAlignForConst[A: Semigroup]: Align[Const[A, *]] =
104104
new Align[Const[A, *]] {
@@ -159,7 +159,7 @@ sealed abstract private[data] class ConstInstances extends ConstInstances0 {
159159
x.combine(y)
160160
}
161161

162-
implicit def catsDataSemigroupForConst[A: Semigroup, B]: Semigroup[Const[A, B]] = _ combine _
162+
implicit def catsDataSemigroupForConst[A: Semigroup, B]: Semigroup[Const[A, B]] = _ `combine` _
163163

164164
implicit val catsDataBifoldableForConst: Bifoldable[Const] =
165165
new Bifoldable[Const] {

core/src/main/scala/cats/data/IndexedStateT.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ sealed abstract private[data] class IndexedStateTMonadError[F[_], S, E]
530530
IndexedStateT(s => F.handleErrorWith(fa.run(s))(e => f(e).run(s)))
531531
}
532532

533-
private[this] trait IndexedStateTFunctorFilter[F[_], SA, SB] extends FunctorFilter[IndexedStateT[F, SA, SB, *]] {
533+
private trait IndexedStateTFunctorFilter[F[_], SA, SB] extends FunctorFilter[IndexedStateT[F, SA, SB, *]] {
534534

535535
implicit def F0: Monad[F]
536536
def FF: FunctorFilter[F]

0 commit comments

Comments
 (0)