[
https://issues.apache.org/jira/browse/GROOVY-11294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17811742#comment-17811742
]
Paul King commented on GROOVY-11294:
------------------------------------
[~paint_ninja], what do you think of this simplified PR:
[https://github.com/apache/groovy/pull/2047]
It could be made to know about emptyList(), singletonList() etc., but I am not
sure the added complexity adds much value.
> Make generated toList() and toMap() methods on records return immutable
> collections
> -----------------------------------------------------------------------------------
>
> Key: GROOVY-11294
> URL: https://issues.apache.org/jira/browse/GROOVY-11294
> Project: Groovy
> Issue Type: Improvement
> Components: record
> Affects Versions: 5.x
> Reporter: Oscar N
> Priority: Minor
>
> With records having strong immutability guarantees, I believe it would make
> sense to also have the collections returned by `toList()` and `toMap()` be
> immutable as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)