Eric Milles created GROOVY-11369:
------------------------------------

             Summary: 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: 4.0.21, 3.0.21
            Reporter: Eric Milles
            Assignee: Eric Milles


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", "[emprt: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)

Reply via email to