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 11:36:00 UTC
[jira] [Created] (GROOVY-8967) @Immutable not handling property
default values from map constructor
Paul King created GROOVY-8967:
---------------------------------
Summary: @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
{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)