You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Andres Almiray (JIRA)" <ji...@apache.org> on 2019/06/06 19:17:00 UTC

[jira] [Created] (GROOVY-9163) AutoExternalizable AST transform replaces custom read/write method

Andres Almiray created GROOVY-9163:
--------------------------------------

             Summary: AutoExternalizable AST transform replaces custom read/write method
                 Key: GROOVY-9163
                 URL: https://issues.apache.org/jira/browse/GROOVY-9163
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 3.0.0-beta-1, 2.5.7
            Reporter: Andres Almiray


A class defined as
{code:java}
@groovy.transform.Sortable
class ClassUnderTest { 
    String name
    int age
    int compareTo(Object o) { 42 }
    int compareTo(ClassUnderTest o) { 42 }
}
{code}
Will override the second definition of {{compareTo}} every single time.

In contrast with {{@Canonical}} for example where explicit {{toString()}} is not overridden.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)