Eric Milles created GROOVY-11370: ------------------------------------ Summary: STC: extension method cannot provide map property (read mode) Key: GROOVY-11370 URL: https://issues.apache.org/jira/browse/GROOVY-11370 Project: Groovy Issue Type: Bug Components: Static Type Checker Reporter: Eric Milles Assignee: Eric Milles
Consider the following: {code:groovy} @TypeChecked void test() { def map = [:] print map.metaClass } test() {code} 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 -- This message was sent by Atlassian Jira (v8.20.10#820010)