[ 
https://issues.apache.org/jira/browse/GROOVY-10789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles resolved GROOVY-10789.
----------------------------------
    Fix Version/s: 4.0.7
       Resolution: Fixed

https://github.com/apache/groovy/commit/f8d80b2353867dfe44d95883c4fad50bf611a0a0

> Collected TupleConstructor causes internal compiler error
> ---------------------------------------------------------
>
>                 Key: GROOVY-10789
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10789
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 4.0.5
>            Reporter: Christopher Smith
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.7
>
>
> I have an in-house annotation collector that applies some of the usual 
> transforms (TupleConstructor, ToString, CompileStatic/POJO). There's a 
> particular class where I want a no-arg constructor available, and I expected 
> that I could "override" the annotation's values like this:
> {code:groovy}
> class TcBug {
>     @AnnotationCollector
>     @TupleConstructor(defaults = false)
>     @interface Collector {}
>     @Collector
>     @TupleConstructor(defaults = true)
>     static class Foo {
>         Integer value
>     }
> }
> {code}
> However, this results in the following error message. I had thought that the 
> above would work; if it isn't "supposed to", then a clearer error message 
> (with location) would be helpful.
> {code}
> TcBug.groovy: -1: Unable to compile class com.example.TcBug$Foo due to hash 
> collision in constructors @ line -1, column -1.
> {code}



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

Reply via email to