Split out of #1595 (report 1 of 9) — filed by @rrodriguesNutrium, credit to them.
KOTLIN_QUERIES["classes"]'s (object_declaration (type_identifier) @name) pattern (kotlin.py:17) never matches a single-line object body:
object A { } // captured
object A {\n fun x() = 1\n} // captured
object A { fun x() = 1 } // ZERO captures
The grammar misparses the one-line form into an infix_expression containing an object_literal and a lambda_literal, so the object_declaration node the query looks for is never produced. The sibling class_declaration pattern handles inline bodies fine.
Effect: singletons written on one line — a common Kotlin idiom — are silently missing from the graph.
Split out of #1595 (report 1 of 9) — filed by @rrodriguesNutrium, credit to them.
KOTLIN_QUERIES["classes"]'s(object_declaration (type_identifier) @name)pattern (kotlin.py:17) never matches a single-line object body:The grammar misparses the one-line form into an
infix_expressioncontaining anobject_literaland alambda_literal, so theobject_declarationnode the query looks for is never produced. The siblingclass_declarationpattern handles inline bodies fine.Effect: singletons written on one line — a common Kotlin idiom — are silently missing from the graph.