You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/01/23 12:15:00 UTC

[jira] [Resolved] (GROOVY-8967) @Immutable not handling property default values from map constructor

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

Paul King resolved GROOVY-8967.
-------------------------------
       Resolution: Fixed
         Assignee: Paul King
    Fix Version/s: 3.0.0-alpha-5
                   2.5.6

> @Immutable not handling property default values from map constructor
> --------------------------------------------------------------------
>
>                 Key: GROOVY-8967
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8967
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 2.5.6, 3.0.0-alpha-5
>
>
> {code:java}
> import groovy.transform.Immutable
> @Immutable
> class Thing {
>     String value = "default"
> }
> def thing = new Thing()
> assert thing.value == "default"
> {code}
> Gives:
> {noformat}
> Assertion failed: 
> assert thing.value == "default"
>        |     |     |
>        |     null  false
>        Thing(null)
> {noformat}



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