Skip to content

Cover multiple ancestors and repeated types in inherited generic constructor rows #7545

Open

Description

@thomhurst

Summary

The inherited constructor argument regression fixtures do not exercise rows on two different ancestors, multiple rows inferring the same concrete type, or identical values on a derived class and its base. A discovery regression could drop these rows without failing the current snapshots.

Prerequisite

Blocked by #7542, delivered by open PR #7544. The referenced fixtures are introduced by that PR and are not yet on main; extend them after it merges.

Reproduction

In tests/TUnit.TestProject/Bugs/_7490/Tests.cs at commit bff3e03, both inherited rows are declared on ArgumentsBase, while IntermediateBase has no rows. Each existing constructor row infers a different type.

Expected and actual

Add [Arguments(43)] to IntermediateBase and update the value checks. Extend generator snapshots to prove both integer rows survive and each produces both generic-method combinations. Add an identical literal on a derived class and base and assert the intended row multiplicity and ordering. Run targeted fixtures in both generated and reflection discovery modes, plus affected generator snapshots.

Current coverage cannot detect these losses. This is non-blocking follow-up from PR #7544, whose reviewers approved the implementation.

Please extend the inherited generic constructor-row regression coverage to cover these cases.

Activity

  1. added
    enhancementNew feature or request
    P3Low: cleanup, minor enhancement, or rare edge case
    on Nov 4, 2026
  2. thomhurst commented on Nov 4, 2026

    @thomhurst
    OwnerAuthor

    Verified against fresh origin/main at 10a0af7 and PR #7544 head 5efa687: _7490/Tests.cs is not yet on main; the PR still has no rows on IntermediateBase, repeated inferred constructor types, or identical derived/base literals. The requested coverage remains outstanding. Added the missing native blocked-by link to #7542 and clarified the prerequisite in the body; this follow-up becomes claimable when #7544 merges and closes #7542.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, minor enhancement, or rare edge caseenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions