hashCode() and equals() are broken with a delayed Try

Issue #70 new
Alex Wei created an issue

Currently the delayed Try does not override hashCode() or equals().

So when comparing a Success or a Failure with a delayed Try, it will always return false no matter if the delayed Try has been evaluated or not.

And a delayed Try should not be forced to evaluated implicitly when hashCode() and `equals() are called.

Should we remove the hashCode() and equals() overrides in Success and Failure?

Or should we add a static method like Try.isEqual(Try<A> a, Try<A> b) that compares two Trys with clear documentation that any delayed Trys would be evaluated?

Comments (0)

  1. Log in to comment