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
{{ message }}
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
According to documentation of ceylon.language.Comparison, the <=> operator (compare method) must return equal if and only if the == (equals method) returns true.
At first sight, it is doubtful that the implementation of the equals method of class Period is correct, because semantically it should make no difference how a period is represented, only how long it takes. This is a bit difficult to decide, as explained in the documentation of the normalized method.
But, presumably, the equals method should also normalize its two operands before comparing the fields.
According to documentation of
ceylon.language.Comparison, the<=>operator (comparemethod) must returnequalif and only if the==(equalsmethod) returnstrue.At first sight, it is doubtful that the implementation of the
equalsmethod of classPeriodis correct, because semantically it should make no difference how a period is represented, only how long it takes. This is a bit difficult to decide, as explained in the documentation of thenormalizedmethod.But, presumably, the
equalsmethod should also normalize its two operands before comparing the fields.