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/02/21 06:19:03 UTC
[jira] [Closed] (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 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)