You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Infer generic test class types from inherited literal constructor arguments #7542
Source-generated discovery ignores inherited literal constructor Arguments when inferring generic test classes. Include these rows consistently, so the inherited-only example in #7490 runs as it does in reflection discovery.
Scope and acceptance
Own the base-inclusive literal attribute collection and reuse in src/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs, the minimal inherited-literal cases in tests/TUnit.TestProject/Bugs/_7490/Tests.cs, tests/TUnit.TestProject/Bugs/_7426/Tests.cs, and an isolated generator snapshot fixture under tests/TUnit.Core.SourceGenerator.Tests.
Cover inherited-only rows, multiple inheritance levels, direct plus inherited literals, generic methods, and inherited GenerateGenericTest with null method rows. Validate generated and reflection discovery. Keep constructor source partitioning and new runtime/public API semantics out of this part; those belong to the sibling sub-issue.
Start from fresh origin/main. Reuse the literal discovery portions of branch issue-7490-inherited-inference (initial commit 3edf214 and subsequent inherited-attribute corrections), not its entire diff. PR #7518 at aee2f77 is retained as reference.
Validation
Run the affected generator snapshots, inspect intentional differences, and run targeted fixtures in both modes. On #7518, workflow 41756832532 failed the Test and GeneratesCachedAotCompatibleGetters output assertions on all three operating systems; investigate the generated differences rather than blindly accepting snapshots. Do not carry those failures into this part. Engine tests must run in CI, not locally.
Deliver the inherited literal inference fix as a small independently reviewable PR under parent #7490.
Activity
Fix inherited constructor source reconciliation (#7542)
Use the selected constructor for inherited typed source inference (#7542
Infer generic class types from inherited literal arguments (#7544)