Skip to content

Commit

Permalink
Fix addresses to be comaprable. (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
craig-openlaw committed Sep 1, 2020
1 parent 06e2f67 commit f10104c
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ final case class ComparisonExpression(
) =>
Success(one.compareTo(two))
case _ =>
Failure(
s"can not compare ${leftValue.getClass} and ${rightValue.getClass}"
)
op match {
case Equals =>
Success(if (rightValue.equals(leftValue)) 0 else 1)
case _ =>
Failure(
s"can not compare ${leftValue.getClass} and ${rightValue.getClass}"
)
}
}).sequence
.map { option =>
option.map { comparaisonResult =>
Expand Down

0 comments on commit f10104c

Please sign in to comment.