resolveBody (kotlin.ts:219): first ERROR child whose child(0) is `{` (fun-interface parent body — unreachable post-defer, kept for contract), else first function_body | class_body | enum_class_body.
(&self, node: Node<'t>)
| 384 | /// (fun-interface parent body — unreachable post-defer, kept for |
| 385 | /// contract), else first function_body | class_body | enum_class_body. |
| 386 | fn resolve_body(&self, node: Node<'t>) -> Option<Node<'t>> { |
| 387 | for i in 0..node.named_child_count() { |
| 388 | let Some(child) = node.named_child(i) else { continue }; |
| 389 | if child.kind() == "ERROR" { |
| 390 | if let Some(first) = child.child(0) { |
| 391 | if first.kind() == "{" { |
| 392 | return Some(child); |
| 393 | } |
| 394 | } |
| 395 | } |
| 396 | if matches!(child.kind(), "function_body" | "class_body" | "enum_class_body") { |
| 397 | return Some(child); |
| 398 | } |
| 399 | } |
| 400 | None |
| 401 | } |
| 402 | |
| 403 | // --- createNode ------------------------------------------------------------ |
| 404 |
no outgoing calls
no test coverage detected