Commit e22c1ea
committed
fix(extractor): recognize inline-new expression as receiver type in extractReceiverName
When the object of a member call is a `new_expression` (e.g. `new Dog().bark()`)
or a parenthesized `new_expression` (e.g. `(new Dog('Rex')).bark()`),
`extractReceiverName` now returns the constructor name (e.g. `'Dog'`) directly
instead of the raw node text (e.g. `'(new Dog(\'Rex\'))')`).
This lets the resolver reach the direct qualified method lookup path
(`Dog.bark`) without relying on the text-based regex heuristic that was
handling these expressions in `call-resolver.ts`.
Closes #13961 parent 784951d commit e22c1ea
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2516 | 2516 | | |
2517 | 2517 | | |
2518 | 2518 | | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
2519 | 2534 | | |
2520 | 2535 | | |
2521 | 2536 | | |
| |||
0 commit comments