[jira] [Closed] (GROOVY-7404) final fields on trait can't be set in constructor

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (GROOVY-7404) final fields on trait can't be set in constructor

JIRA jira@apache.org

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

Paul King closed GROOVY-7404.
-----------------------------
    Resolution: Cannot Reproduce
      Assignee: Paul King

I believe this has been fixed by other issues. If you are still having problems, please reopen and supply a test case. Thanks.

> final fields on trait can't be set in constructor
> -------------------------------------------------
>
>                 Key: GROOVY-7404
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7404
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.3
>            Reporter: Christopher Smith
>            Assignee: Paul King
>            Priority: Minor
>
> I have some exception classes that each carry some tracking information about the nature of the exception in final fields. I tried to pull these fields out into a trait, but attempting to set their values in the constructor using {{this.key = key}} results in a "cannot set read-only property" error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)