Skip to content

fix(generic): share generic inference and constructor-row binding across source-gen, reflection and TUnit0001 - #7883

Merged
thomhurst merged 32 commits into
mainfrom
fix/shared-generic-inference
Nov 29, 2026
Merged

thomhurst merged 32 commits into
mainfrom
fix/shared-generic-inference

Conversation

@thomhurst

@thomhurst thomhurst commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

This consolidates the generic-inference and source-generator backlog into one PR. The source generator, reflection mode and TUnit0001 each had their own copy of generic type inference and constructor-row binding, so every single-issue fix opened a new gap between them. This PR moves those algorithms into shared code that all three call, then fixes the backlog on top of it. The hardest class-row issues are left for follow-up PRs built on this component (listed below).

Shared inference (src/TUnit.Core.SourceGenerator/Helpers/Inference/)

This code is compiled into the generator (every Roslyn variant), the analyzers and TUnit.Core, the same way the existing inference policy files are shared. It sees types only through ITypeModel<TType>. The generator and analyzers use RoslynTypeModel; the engine and generated factories use ReflectionTypeModel. The rules are documented in docs/internal/generic-method-inference.md under "Class rows and row shape".

  • GenericTypeUnifier follows C# method type inference:
    • A bare value gives a lower bound. A type argument or array element gives an exact bound.
    • A tuple's elements keep the tuple's own bound kind, because the binder converts them one by one.
    • A repeated type parameter takes the type every other candidate converts to.
  • ConstructorRowInference picks the constructor for a class row: [TestConstructor], otherwise the first public constructor (in declaration order) whose parameters suit the row's value count. Optional parameters may be omitted, and a trailing array or params collection collects loose values. The values' types never change the choice, so every mode picks the same constructor. That constructor alone infers the class type arguments, reads the source's rows and builds the instance.
    • Generated factories for classes with several public constructors dispatch on args.Length in declaration order.
    • Reflection mode selects the same way.
    • TUnit0001 checks a class row against each candidate constructor.

Behaviour changes

  • A repeated bare T infers the common type in both modes: [Arguments(1, 2L)] on C<T>(T a, T b) gives long. Before, the generator took the last value's type and reflection the first. Loose params T[] values follow the same rule, so two _7209 fixtures that asserted int now assert long. An explicitly supplied T[] still fixes T exactly.
  • A class with several public constructors and no [TestConstructor] builds each row with the first constructor whose parameters suit the row's value count. Before, the generator always called the first constructor and reflection preferred a parameterless one. Constructors of the same arity still resolve to the first declared: choosing among them by value type needed every mode to predict three binders' conversions identically, and review kept finding cases where they differed. Use [TestConstructor] to pick another. A row whose value count fits no constructor now fails with a message naming its count.
  • TUnit0007 now rejects a separate instance data-source provider whose parameterless constructor is not public. Source-generated mode accepted one, but reflection mode fails on it at run time.

Folded in

Issues

Closes #7596, #7365, #7366, #7367, #7680, #7481, #7587, #7622, #7520, #7369, #7334, #7490, #7545, #7386, #7602, #7553, #7740, #7741, #7505, #7551, #7380, #7785, #7178, #7430, #7654

Partly fixed (left open):

Already fixed on main, now closed, with regression tests here:

Follow-ups: #7358, #7362, #7390, #7224, #7597, #7543 and #7463 still reproduce on this branch. Each issue has a comment with counts for both modes, and the fixtures are on followup/class-row-repro-fixtures.

Out of scope:

New issues filed from findings in this PR: #7884, #7885 and #7886.

Also in this PR

Validation (local, net10.0, macOS)

  • Generator snapshots: 431 passed. Every changed .verified.txt was reviewed. The diffs are the per-row constructor dispatch on value count, new instantiations, line numbers, and the new tests.
  • Analyzer tests: 1217 passed. Unit tests: 1209 passed. Incremental generator tests: 111 passed. PublicAPI: 20 passed, with no API changes against main.
  • TestProject: all 61 Bugs/_7xxx generic fixture folders were run in both modes, one filter per run, and compared with an origin/main baseline. Every folder matches main or improves on it (_7208 source-generated mode: 4 failures down to 1). The new fixtures pass in both modes with the same test counts.
  • Engine.Tests is left to CI, per AGENTS.md.

Summary by CodeRabbit

  • New Features
    • Generic class tests infer type arguments from class and method data rows, including tuples, arrays, and wrapped values.
    • When multiple public constructors are available, rows select a compatible constructor; designated test constructors retain precedence.
    • Inherited test-method attributes and eligible data sources on inherited properties are recognized.
  • Bug Fixes
    • Improved row binding for tuples, optional and trailing parameters, and generic constraints.
    • Fixed hook invocation on generic base classes and handling of attribute values.
    • Improved constructor matching for exact and convertible values, collection arguments, and omitted optional parameters.
    • Fixed data-source handling for broadly declared row values and generic method-source attributes.

…structor partitions

The CLR assigns arrays whose elements reduce to the same type (an enum to its
underlying type, and signed and unsigned integers of one size), so int[] is a
uint[] and List<int[]> is an IEnumerable<uint[]>. Partition matching only
recognised the enum case, so a compatible row behind a null row was dropped
once filtering turned on. Addresses the two open P1 review findings on #7599.
…flection adapters

GenericTypeUnifier is linked into the generator, the analyzers and the engine
(like the existing inference policy files) and sees types only through
ITypeModel<TType>. RoslynTypeModel adapts ITypeSymbol for the generator and
analyzers; ReflectionTypeModel adapts System.Type for the engine. Both classify
implicit conversions identically (no user-defined or tuple conversions).

The unifier follows C# method type inference: bare values give lower bounds,
type arguments and array elements give exact bounds, and a repeated type
parameter takes the bound every other bound converts to. No consumer uses it
yet; the same cases are pinned through both adapters.

Refs #7377
…he analyzer

A class data row binds to the [TestConstructor], else the first public
constructor (in declaration order) its values fit, and the same constructor
infers the class type arguments, reads the source's rows and builds the
instance. The rule lives in the shared ConstructorRowInference, used by
reflection discovery and instance creation, by the generator's class-row,
own-member, typed-source and factory paths, and by TUnit0001's class checks.

- Generated factories for classes with several public constructors pick one
  per row through ConstructorSelector.Fits instead of always calling the
  first; reflection picks the same way instead of preferring a parameterless
  constructor.
- A repeated bare T infers the type the other values convert to (1, 2L gives
  long) in both modes, where the generator took the last value and reflection
  the first.
- The generator closes a generic class over the types an own-class
  [MethodDataSource] member's declared rows infer, as reflection does.
- A row that fits no constructor fails with a message naming the row.

Fixes #7365, #7366. Refs #7333, #7446, #7377
…ared row rules

- Class rows unwrap against the constructor's parameters, as method rows do
  against the method's, so a tuple row stays whole for a sole tuple
  constructor parameter, including a TestDataRow-wrapped tuple and a
  (T, string) parameter that generated metadata erases to object (#7367,
  #7680).
- TUnit0001 accepts the row readings both modes bind and its older shape
  checks rejected: an omitted plain trailing array, extra tuple columns
  collected by a params or trailing array, and a whole tuple for a type
  parameter that [GenerateGenericTest] closes over it (#7587, #7622). Types
  are inferred with the shared unifier and must satisfy their constraints;
  one-to-one readings keep the existing checks and explanations. #7489 was
  already fixed on main; its exact repro is now a regression test.
- An own-class member that closes a generic class keeps its rows unpartitioned
  on that instantiation; members joining an [Arguments] row's instantiation,
  or whose rows infer other types, keep main's partitioning and exclusion.
- A declared row column naming the class's own type parameters is unknown, as
  before, rather than contradicting the concrete columns.
- Params values infer T as C# does: (1, 2L) gives long in both modes. The
  _7209 fixtures that asserted the first value's type are updated.
- Documents the shared class-row and row-shape rules.

Fixes #7367, #7680, #7587, #7622. Refs #7489, #7333, #7446, #7377
…sion in both modes

A tuple row's elements are columns the binder converts one by one, so in the
shared unifier they keep the tuple's own bound kind instead of being exact:
(T, T) with (int, long) or (long, int) infers long, while List<(T, T)> still
needs exact element types. Reflection's value inference now resolves all of a
row's bounds together through the unifier, and the declared-row paths in both
modes (ProcessTypeForGenerics, MatchesOpenRowType, MapGenericParameters and
SoleTupleInference) keep the candidate the other converts to rather than the
last one. The preserved tuple is converted for the call by the existing
binding from #7487.

Fixes #7481
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T17:46:53.509560Z 50e11bd New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

This PR adds shared generic type inference and constructor-row selection across source generation, reflection discovery, runtime row handling, and analyzer validation. It also updates data-source generation, hook lookup, inherited method attributes, and reflection metadata.

Changes: Generic inference and row handling

Layer / File(s) Summary
Shared type inference and parity
src/TUnit.Core.SourceGenerator/Helpers/Inference/*, src/TUnit.Core.SourceGenerator/Extensions/RoslynTypeModel.cs, src/TUnit.Core/Helpers/ReflectionTypeModel.cs, src/TUnit.Engine/Services/*, related inference tests
Shared Roslyn and reflection type models support generic unification. Inference tracks exact and lower bounds and resolves compatible repeated type arguments. Tests cover conversions, tuple and array rows, and inference parity.
Constructor-row selection
src/TUnit.Core.SourceGenerator/Helpers/Inference/ConstructorRowInference.cs, src/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator*, src/TUnit.Core.SourceGenerator/CodeGenerators/Helpers/InstanceFactoryGenerator.cs, src/TUnit.Engine/Discovery/*, src/TUnit.Core/Helpers/ConstructorSelector.cs, constructor-selection tests and snapshots
Constructor selection uses row shape, parameter counts, trailing collections, conversions, generic inference, and [TestConstructor] precedence. Generated and reflection factories select fitting constructors and handle optional values.
Runtime row partitioning and tuple binding
src/TUnit.Core/Attributes/TestData/*, src/TUnit.Core/Helpers/*, src/TUnit.Engine/Building/TestBuilder.cs, runtime row tests
Runtime row matching checks constructor compatibility and conversion shapes. Unwrapping and tuple binding preserve whole-row and spread-row behavior, including wrapped rows, wide tuples, optional arguments, and trailing arrays.
Class rows and data-source generation
src/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs, tests/TUnit.TestProject/Bugs/*, tests/TUnit.Core.SourceGenerator.Tests/*
Generated metadata includes eligible class-level member-source rows in generic class inference. Generated factories support runtime-shaped row sources and eligible custom-derived method-source attributes.

Analyzer data-source validation

Layer / File(s) Summary
Analyzer row binding and provider checks
src/TUnit.Analyzers/Extensions/MethodRowBinding.cs, src/TUnit.Analyzers/TestDataAnalyzer.cs, src/TUnit.Analyzers/Helpers/TUnitSymbols.cs, analyzer project configuration, tests/TUnit.Analyzers.Tests/*
The analyzer checks method-data rows against test parameters using whole-row and spread-row binding, generic constraints, and conversions. It also validates inherited property sources and provider construction. Tests cover accepted row shapes and diagnostics.

Open-generic hook lookup

Layer / File(s) Summary
Hook lookup and regression coverage
src/TUnit.Core.SourceGenerator/Generators/HookMetadataGenerator.cs, tests/TUnit.TestProject/Bugs/_7430/*, tests/TUnit.Core.SourceGenerator.Tests/Bugs/7430/*, tests/TUnit.Core.SourceGenerator.Tests/Tests7430.Test.verified.txt
Generated reflection invocation searches for hooks by signature on the open generic type, then rebinds the method to the matching closed type in the instance inheritance chain.

Overridden test-method attributes

Layer / File(s) Summary
Inherited attribute collection and metadata
src/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs, tests/TUnit.TestProject/Bugs/_7785/*, tests/TUnit.Core.SourceGenerator.Tests/Bugs/7785/*, tests/TUnit.Core.SourceGenerator.Tests/Tests7785.Test.verified.txt
Generated metadata collects eligible inherited attributes from overridden test methods. The collection applies inheritance and multiple-use rules and excludes inherited data-source attributes.

Reflection and property metadata

Layer / File(s) Summary
Attribute extraction and property metadata
src/TUnit.Core/Extensions/ReflectionExtensions.cs, src/TUnit.Core/PropertyInjection/ClassMetadataHelper.cs, tests/TUnit.UnitTests/AttributeFallbackArgumentTests.cs, tests/TUnit.TestProject/Bugs/_7553/*
Reflection fallback extraction restores enum types and creates arrays using declared element types. Class property metadata excludes indexers.

Estimated code review effort: 5 (Critical) | ~120 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant TestMetadataGenerator
  participant ConstructorRowInference
  participant InstanceFactoryGenerator
  participant ConstructorSelector
  participant TestClass
  TestMetadataGenerator->>ConstructorRowInference: Select constructor using row shape
  InstanceFactoryGenerator->>ConstructorSelector: Check runtime arguments against candidates
  ConstructorSelector->>InstanceFactoryGenerator: Return fit result
  InstanceFactoryGenerator->>TestClass: Invoke selected constructor
Loading

Possibly related issues

  • thomhurst/TUnit#7390: Concerns reflection parity for type-free generic class rows beside other data sources, which uses the class-row inference paths changed here.
  • thomhurst/TUnit#7543: Concerns constructor source partitions and method providers during generic inference, which overlap with the constructor-row handling changed here.
  • thomhurst/TUnit#7588: Concerns declared row shapes and generic class inference policy inputs that this PR consolidates into shared code.
  • thomhurst/TUnit#7597: Concerns singleton reference tuples containing TestDataRow, which overlaps with the tuple and wrapper binding changes here.
  • thomhurst/TUnit#7333: The PR adds class-level MethodDataSource rows to generic class type inference.
  • thomhurst/TUnit#7366: The PR adds common-type inference for repeated bare type parameters.

Possibly related PRs

  • thomhurst/TUnit#7337: Both PRs change inference from class-level argument rows and update the _7209 tests.
  • thomhurst/TUnit#7392: Both PRs change type-free class rows and constructor selection rules.
  • thomhurst/TUnit#7571: Both PRs change generic test-class inference from method-data rows across source generation and reflection.
Merge Risk: Moderate · previous review 7ba6f

Several constructor-row and generic-inference edge cases from earlier review remain open or unverified. Resolve or explicitly accept them before merging.

Pre-merge checks: Passed 2 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Warning Linked issue #7596 (direct) requires whole-versus-spread reference-tuple and TestDataRow binding, with execution that agrees between generated and reflection modes. The PR does not meet this. The fixt… 1. Make reflection mode bind the ExactBindingIsNotWidenedSpread row the same way generated mode does, then mark the fixture [EngineTest(ExpectedResult.Pass)]. Alternatively, document a concrete, agreed reason that the two modes must dif…
Out of Scope Changes check Inconclusive The PR changes many areas that the linked issue #7596 does not name. Examples include the TUnit0007 rule for separate instance providers, TUnit0001 handling of object, interface and unsealed method … A maintainer must decide whether the broader consolidation is acceptable for this linked issue. If the scope must match #7596 only, split the unlinked changes (TUnit0007, TUnit0001 #7178, indexer metadata #7553, inherited attributes #7785, …
Passed Passed checks: 2 passed

Check name Status Explanation
Title check Passed The title names the main change: shared generic type inference and constructor-row binding, applied across the source generator, reflection mode, and TUnit0001. The changeset adds shared inference hel…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: shared generic type inference and constructor-row binding, applied across the source generator, reflection mode, and TUnit0001. The changeset adds shared inference helpers (GenericTypeUnifier, ConstructorRowInference, ITypeModel implementations), a public ConstructorSelector.Fits API, and analyzer updates for TUnit0001. The title is specific and concise, and it follows the conventional commit style. It omits the constructor selection and analyzer details, which is acceptable.

Full details: Linked Issues check

Explanation

Linked issue #7596 (direct) requires whole-versus-spread reference-tuple and TestDataRow binding, with execution that agrees between generated and reflection modes. The PR does not meet this. The fixture ExactBindingIsNotWidenedSpread in tests/TUnit.TestProject/Bugs/_7883/ConstructorSelectionReviewTests.cs is intentionally not marked [EngineTest]. Its comment states that reflection mode rejects the row at run time, while source-generated mode accepts it. The PR attributes the gap to #7597, a follow-up issue. The issue requires agreement with the later inference regression, so the divergence is an unmet requirement. Other #7596 items have code or test evidence: GenericClassSourceRuntimeTests covers optional, params, array, nested-array and variance cases; Issue7596Tests and ExplicitInstantiationConstructorRowTests cover omitted optional parameters and enum/array rows. The specific reproduction requested in the later review (C&lt;T,U&gt;(T[] first, U second = default!) with C&lt;int,int&gt;, Arguments(new int[]{1},1), and an own-class IEnumerable&lt;TestDataRow&lt;string[][]&gt;&gt; source containing new[]{new[]{"bad"}}, which must exclude the string[] constructor value) is not visible in the fixtures I inspected. I did not establish whether GenericClassSourceRuntimeTests contains it. The disposition of mutable inference state and EvaluateAsync grouping is described only in the PR text, not in code I inspected.

Resolution

  1. Make reflection mode bind the ExactBindingIsNotWidenedSpread row the same way generated mode does, then mark the fixture [EngineTest(ExpectedResult.Pass)]. Alternatively, document a concrete, agreed reason that the two modes must differ and link it to an open issue that the #7596 owner accepts.
  2. Confirm or add a focused test for the string[][] constructor-filter case (explicit C&lt;int,int&gt;, Arguments(new int[]{1},1), own-class TestDataRow&lt;string[][]&gt; source with new[]{new[]{"bad"}}). Cover generated and reflection modes, and confirm the incompatible string[] constructor value is excluded.
  3. Record the disposition of mutable inference state and EvaluateAsync grouping in the issue or the internal docs.
Full details: Out of Scope Changes check

Explanation

The PR changes many areas that the linked issue #7596 does not name. Examples include the TUnit0007 rule for separate instance providers, TUnit0001 handling of object, interface and unsealed method sources (#7178), indexer exclusion in ClassMetadataHelper.WithProperties (#7553), the generator's inherited method-attribute handling (#7785), and the Native AOT hook lookup change (#7430). The PR description links each of these to other issues. The linked issue #7596 excludes discovery adapters, shared inference policy and generator factories. The PR changes shared inference, generator factories and public API (ConstructorSelector.Fits). The PR also states that its scope is broader than the issue's prerequisite-only proposal. The shared constructor-row logic does relate to #7596 objectives. However, I found no code evidence that proves the unlinked changes are unrelated to the PR's declared scope. Whether this breadth is acceptable is a maintainer decision.

Resolution

A maintainer must decide whether the broader consolidation is acceptable for this linked issue. If the scope must match #7596 only, split the unlinked changes (TUnit0007, TUnit0001 #7178, indexer metadata #7553, inherited attributes #7785, hook lookup #7430, and the public API addition outside the #7596 need) into separate PRs or link their issues to this PR.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checked each row at dawn
And found the fitting types to draw
The tuples stayed or spread with care
Constructors matched the values there
The hooks found their closed types too
Then off hopped Bunny, pleased and true

@github-actions

Copy link
Copy Markdown
Contributor

Review of #7883 (shared generic inference / constructor-row binding)

I reviewed the shared inference code (GenericTypeUnifier, ConstructorRowInference, ConstructorSelector) and the PR description. I did not run the build or tests. The skill-based review tooling was unavailable, so I read the code directly.

Design: good. The generator, reflection mode and TUnit0001 each had their own copy of this logic. Moving it behind ITypeModel<TType> with Roslyn and reflection adapters removes that duplication, so one fix no longer opens a gap between the three. Documenting the rules in docs/internal/generic-method-inference.md helps too. Having generated factories call a shared ConstructorSelector.Fits also keeps the two modes in line.

Concerns

  1. Scope and reviewability. The PR closes about 18 issues and says more will land as further commits. It touches the generator, analyzers, core, engine and many snapshots. Please consider stopping at a coherent chunk. A suggested split is the shared unifier plus constructor selection, then the folded-in Preserve runtime data-row binding and constructor partitions for generic class inference #7596, then the follow-on issues. A squash-merge of an ever-growing branch is hard to bisect or revert, and some of the behaviour changes would be easier to review on their own.
  2. Behaviour changes need a release note. These are breaking for users:
    • A repeated bare T now infers the common type, so (1, 2L) gives long where it gave int or the first value's type.
    • The first fitting constructor is now chosen where the first constructor was used before.
    • TUnit0007 now rejects a separate instance data-source provider whose parameterless constructor is not public.
      Please list these in the PR description's user-facing notes or the changelog.
  3. ConstructorSelector.Fits runtime cost. It allocates a Constructor<Type>, a Value<Type>[] and the params Type[] array on every call, and a multi-constructor class calls it once per constructor per row. That is on the discovery hot path, which AGENTS.md asks to keep allocation-light. Consider caching the per-constructor parameter metadata in the generated factory as a static readonly. Alternatively, pass the types once and resolve the constructor index once per row shape. Please measure with a large [Arguments] matrix.
  4. Public API. Fits and NoFittingConstructorMessage are public, even though they are EditorBrowsable(Never). Because generated code references them, that is probably unavoidable. Please confirm that the net472 .verified.txt you edited by hand matches what CI produces. A mismatch will only show up there.
  5. Run-time fit check. Fits builds each value with isArray: type?.IsArray. A null argument gives a null type, so nullability and value-type constructor parameters rely entirely on MayConvertAtRunTime. A test with a null row against a constructor taking a non-nullable struct would pin that down.
  6. AOT and trimming. ReflectionTypeModel is now used from generated factories. Please confirm there is no new MakeGenericType or reflection path without DynamicallyAccessedMembers or RequiresUnreferencedCode annotations. The description does not mention an AOT publish check, and AGENTS.md asks for one when reflection paths change.

Validation. The reported results are thorough, with both modes compared against a main baseline. Engine.Tests is left to CI, as AGENTS.md says. Please make sure that run is green before merge, because the constructor-selection change is the part most likely to show a regression there.

No blocking correctness bug found in what I read. The main requests are the allocation cost in item 3, the AOT confirmation in item 6, and splitting or documenting the breaking changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24fd45e3ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…a class-level member source

A class-level [MethodDataSource] whose declared rows infer the class type
arguments, whether a member of the class itself or of a provider named with
typeof, now closes the class for a generic test method too. Each inferred class
is paired with every method instantiation, including [GenerateGenericTest]
arity failures, as reflection mode does.

Fixes #7369
This was referenced Dec 1, 2026

This branch was previously deployed

1 inactive deployment
Pull Requests — 50e11bd3 Deployed Nov 29, 2026 by thomhurst via modularpipeline (macos-latest) #21900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant