Keegan Witt created GROOVY-7522:
-----------------------------------

             Summary: Constructor ASTs shouldn't remove existing constructors
                 Key: GROOVY-7522
                 URL: https://issues.apache.org/jira/browse/GROOVY-7522
             Project: Groovy
          Issue Type: Bug
            Reporter: Keegan Witt


`@TupleConstructor` and `@Canonical` should not overwrite existing 
constructors.  So these should work, but don't currently

{code:java}
assert new Cat("Mr. Bigglesworth").name == null

@groovy.transform.TupleConstructor
class Cat {
  String name
  int age
  Cat(String name) {}
}
{code}

{code:java}
assert new Cat("Mr. Bigglesworth").name == null

@groovy.transform.Canonical
class Cat {
  String name
  int age
  Cat(String name) {}
}
{code}

Why aren't the includes/excludes annotation elements a sufficient workaround?  
Because I might want all the other combinations `@TupleConstructor` provides, 
but still have my own implementation for just one of the combinations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to