Skip to content

Commit

Permalink
Change override of neqv in Order
Browse files Browse the repository at this point in the history
Based on the discussion in typelevel#2230.
  • Loading branch information
ceedubs committed Apr 17, 2018
1 parent bee3329 commit 140ee0f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kernel/src/main/scala/cats/kernel/Order.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ trait Order[@sp A] extends Any with PartialOrder[A] { self =>

/**
* Returns true if `x` != `y`, false otherwise.
*
* Note: this default implementation provided by [[Order]] is the same as the
* one defined in [[Eq]], but for purposes of binary compatibility, the
* override in [[Order]] has not yet been removed.
* See [[https://github.com/typelevel/cats/pull/2230#issuecomment-381818633 this discussion]].
*/
override def neqv(x: A, y: A): Boolean =
compare(x, y) != 0
override def neqv(x: A, y: A): Boolean = !eqv(x, y)

/**
* Returns true if `x` <= `y`, false otherwise.
Expand Down

0 comments on commit 140ee0f

Please sign in to comment.