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/13 18:53:00 UTC

[jira] [Created] (GROOVY-10823) Describe named arguments constructor usage for enum

Eric Milles created GROOVY-10823:
------------------------------------

             Summary: Describe named arguments constructor usage for enum
                 Key: GROOVY-10823
                 URL: https://issues.apache.org/jira/browse/GROOVY-10823
             Project: Groovy
          Issue Type: Documentation
            Reporter: Eric Milles


Groovy {{enum}} includes no-arg and named-args constructors if no explicit constuctors are declared.  Add description to language docs for named arguments constructor.

{code:groovy}
enum Foo {
  BAR(number:42)
  Number number
}
print Foo.BAR.getNumber() // prints: 42
{code}



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