Files
graphify/tests
Kamal Pandey 1331be175c fix(go): normalize a generic receiver type before building its id
(b *Box[T]) reads its receiver's type field as "Box[T]" verbatim, but
the type declaration's own id is keyed on the bare name alone: type
Box[T any] struct {...} captures [T any] as a separate
type_parameter_list, never part of the name. Without stripping the
instantiation before that text turns into an id, every method on a
generic type attached to a node disconnected from the type itself --
Box's own node carried no method edges at all, even though
go_type_table-based call resolution could still reach a method through
the receiver's own-function self_type binding.

Adds _go_strip_generic_args and applies it everywhere a receiver's raw
type text is turned into an id: the live walk() pass that attaches a
method to its owner, and the separate case-collision pre-scan
(_receiver_type_of) that has to agree with it or case-only-collision
salting silently breaks for generic types.

Found while verifying the already-merged `go_type_table` member-call
resolution (deca9fa3 / cherry-picked as 1695efae) against the edge
cases from #3368 -- this is the one gap left in that fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
(cherry picked from commit 1a8a04ac50)
2026-10-13 22:53:44 +01:00
..