mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
Two gaps in the call-graph walker, both flagged by codex on #435: 1. `const Foo(...)` / `new Foo(...)` constructor calls were silently dropped. The grammar emits these as `const_object_expression` / `new_expression` containing `arguments` directly — they bypass the `selector > argument_part` shape the walker relied on. Added a dedicated branch that records the inner `type_identifier` as the callee. Critical for Flutter widget trees where `runApp(const MyApp())` would otherwise lose the MyApp construction edge. 2. When a getter / setter / constructor / factory_constructor has a body, its `method_signature` wraps `getter_signature` / `setter_signature` / `constructor_signature` / `factory_constructor_signature` instead of `function_signature`. The walker only looked for `function_signature`, so `pendingName` stayed null and the sibling `function_body` was walked with an empty stack — calls inside ctor/factory/getter/setter bodies were silently dropped even though those members were already extracted as functions. Now dispatch across all five signature variants, using `constructorName` for the (factory) constructor pair to match what `collectClassBody` pushes. Tests: 41 → 47 dart cases (+6); full core 733 → 739; no regressions.