Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.21, 4.0.21
-
None
Description
Consider the following:
@TypeChecked
void test() {
def map = [:]
print map.metaClass
}
test()
The script prints "null" (before Groovy 5) indicating that "getMetaClass()" extension method is not used. However, node metadata indicates that the extension method is used. For example, adding "Number n = map.metaClass" says: "Cannot assign value of type groovy.lang.MetaClass to variable of type java.lang.Number"
GROOVY-5001, GROOVY-5491, GROOVY-5568, GROOVY-9115, GROOVY-9123