You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2022/11/21 20:25:00 UTC

[jira] [Assigned] (GROOVY-10789) Collected TupleConstructor causes internal compiler error

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

Eric Milles reassigned GROOVY-10789:
------------------------------------

    Assignee: Eric Milles

> 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
>
> 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)