Skip to content

Share generic-class inference precedence, scoping, and method pairing between discovery modes #7451

Closed

Description

@thomhurst

Generic class inference currently implements class-row selection, method-derived class types, and class/method pairing separately in the source generator and reflection discovery. Share these decisions so future changes apply to both discovery modes. This is the generic-class portion of #7371.

Scope

  • Extend the shared inference policy to class Arguments rows (including type-free rows), typed and method data sources, parameter inference attributes, and class GenerateGenericTest.
  • Centralize source precedence and scoping, including pairing class and method type arguments.
  • Extend the documented table and common parity matrix to class sources and combined generic classes/methods.
  • Keep type-system-specific extraction in adapters. Coordinate with Generic class row that infers no type argument: reflection parity beside other data sources #7390, which fixes existing type-free-row behavior; do not duplicate that issue.

Acceptance criteria

Both modes use the shared class policy. The same parity matrix covers source ordering, duplicate inference, inferred/uninferred rows, explicit class types, and class/method pairing. Relevant generator snapshots and targeted tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, minor enhancement, or rare edge caseenhancementNew feature or requestin-progressWork is in progress

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions