You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Keegan Witt (JIRA)" <ji...@apache.org> on 2015/07/24 01:12:04 UTC
[jira] [Updated] (GROOVY-7522) Constructor ASTs shouldn't overwrite
existing constructors
[ https://issues.apache.org/jira/browse/GROOVY-7522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Keegan Witt updated GROOVY-7522:
--------------------------------
Summary: Constructor ASTs shouldn't overwrite existing constructors (was: Constructor ASTs shouldn't remove existing constructors)
> Constructor ASTs shouldn't overwrite 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)