[
https://issues.apache.org/jira/browse/GROOVY-11369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-11369:
---------------------------------
Fix Version/s: 4.0.22
> STC: map properties "class" and "empty" indicated as read-only
> --------------------------------------------------------------
>
> Key: GROOVY-11369
> URL: https://issues.apache.org/jira/browse/GROOVY-11369
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 3.0.21, 4.0.21
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 3.0.22, 4.0.22
>
>
> Consider the following:
> {code:groovy}
> @TypeChecked test(Map map) {
> print map.empty
> print map.class
> print map.metaClass
> map.empty = null
> map.class = null
> map.metaClass = null
> print map
> }
> test([:])
> {code}
> When executed (without {{{}@TypeChecked{}}}) the script prints "null",
> "null", "null", "[empty: null, class: null, metaClass: null]". So these are
> all map entry read and writes. However, STC indicates that "class" and
> "empty" are read-only properties.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)