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

Eric Milles updated GROOVY-6618:
--------------------------------
    Labels: breaking varargs  (was: breaking)

> Enum constructor doesn't work properly with variable arguments
> --------------------------------------------------------------
>
>                 Key: GROOVY-6618
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6618
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.2.2
>            Reporter: Sergei Egorov
>            Assignee: Jochen Theodorou
>            Priority: Critical
>              Labels: breaking, varargs
>             Fix For: 2.4.0-beta-4
>
>
> {code:java}
> enum Test {
>     TEST1(1, 2, 3)
>     Test(Integer... ints) {
>         println ints
>     }
> }
> println Test.TEST1
> {code}
> This code gives me only "[1]", but it should be "[1,2,3]"
> In Java everything is fine:
> {code:java}
> public enum Test {
>   TEST1(1, 2, 3);
>   
>   Test(Integer... ints) {
>     System.out.println(java.util.Arrays.toString(ints));
>   }
>   public static void main(String []args){}
> }
> {code}



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

Reply via email to