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 2024/12/10 22:30:00 UTC

[jira] [Created] (GROOVY-11531) Missing errors for improper enum constant initialization

Eric Milles created GROOVY-11531:
------------------------------------

             Summary: Missing errors for improper enum constant initialization
                 Key: GROOVY-11531
                 URL: https://issues.apache.org/jira/browse/GROOVY-11531
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles


Consider the following:
{code:groovy}
enum E {
  FOO(),
  BAR {},
  BAZ(null);
  E(int i) {
  }
}
{code}

As with GROOVY-10811, an error is expected because there isn't a no-arg constructor for FOO and BAR to call.  And BAZ calls with an invalid argument.



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