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] getSignature returns undefined due to getChildByField on fieldless grammar #1495
tree-sitter-kotlin does not use field names, but getSignature
calls getChildByField(node, 'function_value_parameters'),
which causes the signature of Kotlin methods to always resolve
to undefined.
Fix
The fix is consistent with extractKotlinReturnType:
replace getChildByField with iteration over namedChildren,
matching the target node by its type property.
Fixed in #1807 (57d9132c), landing upstream #1687 (@danusha2345) onto current main as a Forge PR.
Root cause
tree-sitter-kotlin has no field names, so getSignature via getChildByField('function_value_parameters' / 'type') always missed → every Kotlin function/method had signature: undefined.
Fix
Positional namedChildren read (same pattern as extractKotlinReturnType) in wasm kotlin.ts + kernel signature_of lockstep.
Activity
colbymchenry commentedon Sep 9, 2026
Fixed in #1807 (
57d9132c), landing upstream #1687 (@danusha2345) onto currentmainas a Forge PR.Root cause
tree-sitter-kotlinhas no field names, sogetSignatureviagetChildByField('function_value_parameters' / 'type')always missed → every Kotlin function/method hadsignature: undefined.Fix
Positional
namedChildrenread (same pattern asextractKotlinReturnType) in wasmkotlin.ts+ kernelsignature_oflockstep.Linux verify (fail → pass)
greet(name: String): StringnoReturn(x: Int)topLevel(a: Int, b: Int): IntUndefined signatures 3 → 0; wasm/kernel parity PASS. Focused tests: 31 passed (
kernel-kotlin-parity+ Kotlin extraction + kernel-scaffold) withCODEGRAPH_KERNEL_EXPECT=1.Closing as completed. Upstream #1687 will be closed as superseded by #1807.
fix(kotlin): read a function's signature positionally (#1495) (#1807)