Commit Graph
3 Commits
Author SHA1 Message Date
oleksii-tumanov f7bc904bda Preserve case-only interface signature owners
(cherry picked from commit 72d5914a10)
2026-09-22 14:58:12 +01:00
oleksii-tumanov bda82f9ded fix(go): preserve interface method signature references
(cherry picked from commit 00fb309983)
2026-09-22 14:58:12 +01:00
rajatnagda45 a9450a537e fix(go): extract method requirements declared in an interface body
The interface_type branch only handled interface embedding and generic
type-set constraints, so the method requirements that make up an
interface's contract were dropped. An interface such as

    type Shape interface {
        Area() float64
        Perimeter() (float64, error)
    }

became an empty node - Area and Perimeter never entered the graph, and
nothing could resolve against the interface's method set.

Walk the method_elem children too, mirroring the receiver-method path:
each requirement becomes a .Method() node hung off the interface via a
method edge. Embedding (type_elem) keeps emitting embeds/references, so
the two never blur.

Adds regression coverage: requirements surface as method nodes, an
embedded interface stays a heritage edge, and an interface method and a
concrete struct method of the same name remain distinct nodes.

(cherry picked from commit 739940a42b)
2026-09-20 13:59:25 +01:00