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/args missing backtick-identifier support (found during #825) #899
Follow-up from #825 (scala extraction hardening, part of epic #813). #823 (kotlin extraction hardening) already closed without catching this — filing separately rather than reopening it.
The gap
Kotlin, like Scala, allows backtick-quoted arbitrary identifiers as an escape hatch for reserved-word or space-containing names — most commonly used for test method names (fun `should return true when input is valid`() { ... }, a very common JUnit5/Kotlin idiom).
LANGUAGE_DEFINITIONS["kotlin"]["rules"]["func_start"] and ["args"] both require a plain [a-zA-Z_]\w* for the name, so a backtick-quoted identifier never matches at all:
This is the same doc's-Rule-16 identifier-grammar shape confirmed as a real bug for scala in #825, fixed there as an alternative capture group (`([^`\n]{1,200})`|([a-zA-Z_]\w*)) resolved downstream via match.lastindex — no new pipeline infrastructure needed, detector.py already resolves multi-alternative name captures this way (see java's (init)|(constructor) groups).
Suggested fix
Mirror scala's #825 fix shape for kotlin's func_start and args rules. Check class_start too for completeness (backtick-quoted type names are far rarer in practice, so may not be worth it — use the same "realism triage" judgment call #825 used to skip a couple of low-value seams).
Activity
Fix real bugs found in agc_assembly extraction rules (epic #813/#857)
test(extraction): harden agc_assembly extraction coverage (#857) (#931)
fix(kotlin): support backtick-quoted identifiers in func_start, args,…