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] [Updated] (GROOVY-10823) Describe named arguments constructor usage for enum

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

Eric Milles updated GROOVY-10823:
---------------------------------
    Labels: enum  (was: )

> 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
>            Priority: Minor
>              Labels: enum
>
> 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)