mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-28 07:03:20 +08:00
A virtual method called on a concrete derived object (Derived d; d.speak(2), where Derived overrides Base::speak) resolved directly to Derived.speak and was emitted as lsp_type_dispatch. The existing virtual-dispatch path only fired when a method was resolved THROUGH a base with a derived override; an override resolved directly on the derived type was missed. Extend the same notion (a derived override of an inherited method = polymorphic dispatch) to the direct-resolution case: when a method is found directly on the receiver type AND a base class also declares it, emit lsp_virtual_dispatch. This mirrors the codebase's existing heuristic definition of virtual dispatch (an override exists) rather than the textual 'virtual' keyword, so it stays consistent. lsp_type_dispatch and lsp_base_dispatch fixtures are unaffected. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>