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
Kotlin func_start misses extension functions with a generic receiver (Collection<X>.name, fun <T> List<T>.name) #3608
Kotlin function extraction drops extension functions whose receiver type is generic:
source
extracted
fun String.a(): Int { … }
a ✓
public fun Collection<CodeBlock>.joinToCode(separator: CharSequence = ", "): CodeBlock { … }
nothing
fun <T> List<T>.b(): Int { … }
nothing
fun Map<String, Int>.c() = 1
nothing
Direct StructuralExtractor("kotlin", LANGUAGE_DEFINITIONS).splice(...) on each shape.
Impact
Function counts, call graph and dead-code signals miss every such function. Kotlin libraries use them heavily: kotlinpoet's joinToCode, asClassName-style helpers.
The receiver type in func_start needs to accept a bounded generic argument list (<…>, nesting ≤ 2) before the .name(, plus an optional type-parameter list after fun. Follow gitgalaxy/standards/how_to_add_a_language.md (ReDoS rules), add valid/invalid/pathological cases to tests/extraction/languages/test_kotlin.py, and verify with tree_sitter_accuracy_audit.py --lang kotlin.
Activity
fix(kotlin): extract extension functions with a generic or nullable r…
fix(kotlin): extract extension functions with a generic or nullable r…