You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Phaninra (JIRA)" <ji...@apache.org> on 2019/08/08 18:13:00 UTC

[jira] [Created] (GROOVY-9214) A map's "withDefault" feature is not surviving when supplied to a constructor of @Immutable class

Phaninra created GROOVY-9214:
--------------------------------

             Summary: A map's "withDefault" feature is not surviving when supplied to a constructor of @Immutable class
                 Key: GROOVY-9214
                 URL: https://issues.apache.org/jira/browse/GROOVY-9214
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.5.7
            Reporter: Phaninra


{code:java}
import groovy.transform.Immutable

Map map = [hi: 1, hello:2].withDefault{3}

assert map.get('does not exist') == 3

Person p = new Person(map: map)

assert p.map.get('does not exist') == 3

@Immutable
class Person{
 Map map
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)