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 2025/03/05 00:35:00 UTC
[jira] [Updated] (GROOVY-11531) Missing errors for improper enum constant initialization
[ https://issues.apache.org/jira/browse/GROOVY-11531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-11531:
---------------------------------
Component/s: class generator
> Missing errors for improper enum constant initialization
> --------------------------------------------------------
>
> Key: GROOVY-11531
> URL: https://issues.apache.org/jira/browse/GROOVY-11531
> Project: Groovy
> Issue Type: Bug
> Components: class generator
> Reporter: Eric Milles
> Priority: Minor
> Labels: enum
>
> 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)