Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.21, 4.0.21
-
None
Description
Consider the following:
@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([:])
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.
Attachments
Attachments
Issue Links
- relates to
-
GROOVY-11507 "class" and "empty" listed as map properties
- Closed