On Mon, Jul 25, 2016 at 5:05 PM, Jochen Theodorou <blackd...@gmx.org> wrote:
> On 24.07.2016 14:56, Paul King wrote:
>>
>> I think the GString check can be moved up as you suggest to improve
>> the readability of the code without breaking existing behavior, so
>> I've done that.
>>
>> Whether to go with your other suggestions is less clear to me.
>>
>> If we assume the check in EqualsTest#testParentChildrenEquals remains
>> valid, i.e. we want symmetry of equals for java.util.Date and
>> java.sql.Time which compareTo gives us so long as we have both the
>> left<<right and right<<left isAssignable checks, then the current code
>> in master seems reasonable. And once we have the right<<left case, we
>> need the Object check as well for GROOVY-4046.
>
>
> If we do this only for java.util.Date and family, then we should probably
> special case it much like we do for GString

I should have said earlier, I don't think that is the current intended
behavior. I believe currently we try to allow for other Comparable
classes too. But we should make that explicit one way or the other.

Cheers, Paul.

Reply via email to