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>)
| 300 | /// (fun-interface parent body — unreachable post-defer, kept for |
| 301 | /// contract), else first function_body | class_body | enum_class_body. |
| 302 | fn resolve_body(&self, node: Node<'t>) -> Option<Node<'t>> { |
| 303 | for i in 0..node.named_child_count() { |
| 304 | let Some(child) = node.named_child(i) else { continue }; |
| 305 | if child.kind() == "ERROR" { |
| 306 | if let Some(first) = child.child(0) { |
| 307 | if first.kind() == "{" { |
| 308 | return Some(child); |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | if matches!(child.kind(), "function_body" | "class_body" | "enum_class_body") { |
| 313 | return Some(child); |
| 314 | } |
| 315 | } |
| 316 | None |
| 317 | } |
| 318 | |
| 319 | // --- createNode ------------------------------------------------------------ |
| 320 |
no outgoing calls
no test coverage detected