Skip to content

TypeScript resolution fixture missing expected-edges entries for new X() -> X.constructor attribution (#1892) #2063

Description

@carlos-alm

Summary

While validating the fix for #1929 (bare super(...) extraction), I noticed tests/benchmarks/resolution/fixtures/typescript/hierarchy.ts's constructor-instantiation call sites resolve to both the class node and the class's .constructor method node:

makeCircle@hierarchy.ts -> Circle@hierarchy.ts             (documented in expected-edges.json)
makeCircle@hierarchy.ts -> Circle.constructor@hierarchy.ts (NOT documented)
makeEllipse@hierarchy.ts -> Ellipse.constructor@hierarchy.ts (NOT documented)
makeRectangle@hierarchy.ts -> Rectangle.constructor@hierarchy.ts (NOT documented)

The X.constructor edges come from the existing constructor-call attribution feature (#1892) — they're correct, pre-existing behavior, unrelated to #1929's bare-super(...) fix. They just aren't listed in expected-edges.json, so the benchmark's recall metric doesn't credit them and precision headroom is slightly eaten by "extra" resolved edges the test doesn't know about.

Suggested fix

Add the missing X.constructor target entries (mode: constructor) alongside the existing X class-node entries in tests/benchmarks/resolution/fixtures/typescript/expected-edges.json, and audit other language fixtures for the same gap if the #1892 attribution applies there too.

Found opportunistically while working on #1929 — filed separately per this repo's scope-discipline convention rather than folded into that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions