Skip to content

Commit

Permalink
fixed eqv alias issue #2513: (#2521)
Browse files Browse the repository at this point in the history
* fixed eqv alias issue #2513:

* Update eq.scala

* Update eq.scala
  • Loading branch information
binkabir authored and kailuowang committed Sep 24, 2018
1 parent 1d5a51a commit 33f5c5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/scala/cats/syntax/eq.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ trait EqSyntax {
final class EqOps[A: Eq](lhs: A) {
def ===(rhs: A): Boolean = macro Ops.binop[A, Boolean]
def =!=(rhs: A): Boolean = macro Ops.binop[A, Boolean]
def eqv(rhs: A): Boolean = Eq[A].eqv(lhs, rhs)
def neqv(rhs: A): Boolean = Eq[A].neqv(lhs, rhs)
}
2 changes: 2 additions & 0 deletions tests/src/test/scala/cats/tests/SyntaxSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ object SyntaxSuite extends AllSyntaxBinCompat with AllInstances with AllSyntax {
val y = mock[A]
val b0: Boolean = x === y
val b1: Boolean = x =!= y
val b2: Boolean = x eqv y
val b3: Boolean = x neqv y
}

def testPartialOrder[A: PartialOrder]: Unit = {
Expand Down

0 comments on commit 33f5c5b

Please sign in to comment.