Skip to content

Share typed-row parameter binding between analyzer validation and discovery rules #7465

Closed

Description

@thomhurst

Summary

The test-data analyzer computes the effective parameter types of a generic method inline, separately from discovery and invocation binding. Optional arguments, injected cancellation tokens, trailing arrays and params collections can therefore drift between validation and execution. Extract a pure binding helper and test its results against the discovery rules.

Proposal

Move the closed-signature row-to-parameter calculation in TestDataAnalyzer.CheckDataGenerator into a helper beside TypedDataSourceInference. Cover omitted optional and trailing array parameters, injected tokens selected by declared position, packed arrays, element conversions, loose trailing values and supported params collections. Assert agreement on inference success versus null, and compare effective expected types with invocation behavior; the existing inference-only parity table does not cover this calculation.

Acceptance criteria

  • The analyzer calls a pure helper for its effective closed parameter types without changing supported behavior.
  • Regression coverage checks the row-binding cases above and protects the supported collection set from drift.
  • Preserve analyzer diagnostics for invalid elements and constraints, and both discovery modes' execution behavior.

Follow-up requested by Claude's current-head review of #7460: #7460 (comment). The relevant code is TestDataAnalyzer. Related inference parity work: #7386; broader inference rules: #7371. Please consolidate this binding computation and add parity coverage.

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