Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change override of neqv in Order #2232

Merged
merged 1 commit into from
Apr 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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