Paul King created GROOVY-10705:
----------------------------------

             Summary: ToString order bug for super properties
                 Key: GROOVY-10705
                 URL: https://issues.apache.org/jira/browse/GROOVY-10705
             Project: Groovy
          Issue Type: Bug
            Reporter: Paul King
            Assignee: Paul King


In the doco for @ToString, we indicate that properties from a child come before 
properties from super classes. This is true but properties that also happen to 
be present in super classes don't keep their respective order with other 
properties, e.g.:
{code:java}
class Base {
    String a = 'base a'
    String c = 'base c'
}

@groovy.transform.ToString(includeSuperProperties=true)
class Child extends Base {
    String a = 'child a'
    String b = 'child b'
}

println new Child() // => Child(child b, child a, base c)
{code}
However, the expected order is for properties within the child class to follow 
declaration order.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to