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)

Reply via email to