I have this Script:
def person = new Person(lastName: "foo", firstName: "bar")
println person
@groovy.transform.TupleConstructor
@groovy.transform.ToString(includeNames = true, includeFields=true)
class Person
{
def lastName
def firstName
}
why it gives me:
Person(lastName:[lastName:foo, firstName:bar], firstName:null)
Why firstName remains null and lastName has the map of the parameters?
I am using groovy 1.8.6