(caller: Node, callee: string)
| 565 | return known; |
| 566 | }; |
| 567 | const resolveByReceiver = async (caller: Node, callee: string): Promise<Node | null> => { |
| 568 | const segments = callee.replace(/\([^()]*\)/g, '').split(/[.:]+/).filter(Boolean); |
| 569 | if (segments.length < 2) return null; |
| 570 | const type = await receiverTypeFor(caller, callee); |
| 571 | if (!type) return null; |
| 572 | const cls = await classOfType(type); |
| 573 | if (!cls) return null; |
| 574 | const method = segments[segments.length - 1]!; |
| 575 | const members = cg.getNodesInFile(cls.filePath).filter((n) => (n.kind === 'method' || n.kind === 'function') && n.name === method && n.startLine >= cls!.startLine && n.endLine <= cls!.endLine); |
| 576 | return members[0] ?? null; |
| 577 | }; |
| 578 | |
| 579 | /** |
| 580 | * A name-match that the call as written disproves: the target is a method of |
no test coverage detected