Pattern
When a function parameter uses object destructuring with a rest element (`...rest`), and the rest object's property is then called, codegraph does not resolve the callee.
Failing example (from Jelly micro-test `rest.js`)
```js
var obj = {
e1: () => { console.log("31"); },
e2: () => { console.log("32"); },
e3: () => { console.log("33"); },
e4: () => { console.log("34"); }
};
function f3({ e1: eee1, ...eerest }) {
eee1();
eerest.e4(); // eerest.e4 === obj.e4 when called as f3(obj)
}
f3(obj);
```
Expected edge: `f3 → e4` (via `eerest.e4()` with `eerest` holding the rest of `obj`) — not resolved.
Relationship to #1321
Issue #1321 tracks array spread and `Array.from`/`concat`/`flat` callbacks. This issue is about object destructuring rest, where `...eerest` collects the un-destructured keys of an object parameter. The call `eerest.e4()` requires:
- Tracking that `eerest` is the rest of the destructured parameter `obj`
- Knowing the type of the argument passed to `f3` (the `obj` literal)
- Looking up `obj.e4` as the callee for `eerest.e4()`
Benchmark evidence
Jelly micro-test corpus (`tests/benchmarks/resolution/fixtures/jelly-micro/rest/`):
Pattern
When a function parameter uses object destructuring with a rest element (`...rest`), and the rest object's property is then called, codegraph does not resolve the callee.
Failing example (from Jelly micro-test `rest.js`)
```js
var obj = {
e1: () => { console.log("31"); },
e2: () => { console.log("32"); },
e3: () => { console.log("33"); },
e4: () => { console.log("34"); }
};
function f3({ e1: eee1, ...eerest }) {
eee1();
eerest.e4(); // eerest.e4 === obj.e4 when called as f3(obj)
}
f3(obj);
```
Expected edge: `f3 → e4` (via `eerest.e4()` with `eerest` holding the rest of `obj`) — not resolved.
Relationship to #1321
Issue #1321 tracks array spread and `Array.from`/`concat`/`flat` callbacks. This issue is about object destructuring rest, where `...eerest` collects the un-destructured keys of an object parameter. The call `eerest.e4()` requires:
Benchmark evidence
Jelly micro-test corpus (`tests/benchmarks/resolution/fixtures/jelly-micro/rest/`):