Skip to content

Emit stable signatures for generic C# method display names #4916

Description

@Widthdom

Summary

Generic C# method families fall back to display names like Name@line, omitting generic arity and parameter types; moving the method can therefore change its displayed identity.

Audit IDs: G-07. Reproduced with locally built cdidx v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a.

Existing issue relationship

Closed #3924 is adjacent generic overload/signature work.

Expected behavior and PR scope

Derive stable readable generic signatures from normalized arity and parameter types while preserving canonical identity and old-index compatibility. Keep this to display/disambiguation.

Implementation guide for Codex 5.6 sol xhigh

  • Separate canonical identity, exact query aliases, and human display name.
  • Normalize generic arity, type parameters/constraints policy, parameter modifiers/types, and nested generic types.
  • Cover generic/non-generic overloads, extension/local/explicit-interface methods, tuples/nullable/arrays, and incomplete parse fallback.
  • Avoid persisting source line as identity; document any additive metadata/fallback for old DBs.
  • Add focused regression/contract tests as appropriate, run the full net8.0 and net9.0 suite, and add the required bilingual changelog.d/unreleased/ fragment.

Acceptance criteria

  • Generic overloads have distinct useful signatures.
  • Line movement does not rename the displayed method.
  • Non-generic display and exact navigation remain stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions