groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-8967) @Immutable not handling property default values from map constructor
Date Thu, 21 Feb 2019 06:19:03 GMT

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

Paul King closed GROOVY-8967.
-----------------------------

> @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)

Mime
View raw message