You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ModularBigInteger overrides equals, but does not override hashCode.
Thus, distinct objects that compare equally (using structural equality) will not have the same hashCode.
val creator =ModularBigInteger.creatorForModulo(7)
val a = creator.fromInt(6)
val b = creator.fromInt(6)
if (a == b) {
require(a.hashCode() == b.hashCode())
}
The text was updated successfully, but these errors were encountered:
ModularBigInteger
overridesequals
, but does not overridehashCode
.Thus, distinct objects that compare equally (using structural equality) will not have the same
hashCode
.This violates the general
hashCode
contract.MWE:
The text was updated successfully, but these errors were encountered: