You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
calls_out (java/kotlin/groovy): generic constructor and function calls Name<T>( / new X<>() missed #4124
calls_out misses JVM constructor and generic-function calls written with a type-argument list between the name and (. Java, Kotlin and Groovy use CALLS_OUT_C_STYLE_NO_ANNOTATION ((?<!@)\b(name)\s*\(), so the <...> stops the match:
Java new HashMap<String, Object>(), new ArrayList<>(list) (diamond), new Action<Project>() { ... } (anonymous class)
By calls_out contract C3, a constructor is a call to the name written. #3644 fixed the same gap for cpp/typescript/csharp with CALLS_OUT_C_STYLE_GENERIC. That pattern does not fit here as is: it has no @ annotation guard (C1), and it needs at least one character between the brackets, so a Java diamond <> still fails.
Evidence
Graph comparison ledger shape java/call/object_creation_expression/generic_type+generic/agree[tree_sitter]_vs[gitgalaxy] (#3799): 35 of 35 occurrences are generic constructor calls. It is Java's only open Level-1 shape (raw recall 98.2%, FN 35, FP 0). Examples:
A standalone run of an annotation-guarded generic pattern that accepts the diamond, over every crucible .java/.kt/.kts/.groovy/.gradle file, gained 53 Java, 7 Kotlin and 8 Groovy captures. All 68 are real constructor or generic-function calls, and no existing capture was lost.
Not in scope
Swift and Dart use the same pattern but write generic declarations as func map<T>(. Their gains would include declaration headers, so they need their own check. Scala writes [T].
Activity
golden masters: re-bless for JVM generic constructor calls (#4124)
calls_out (JVM): generic constructor calls; JVM graph-ledger verdicts (…