Closed
Description
Describe the bug
C# record constructors are marked as uncovered whenever SkipAutoProps is true. But if SkipAutoProps is false, the coverage is correct.
To Reproduce
-
Create a file with a simple record
public record MyRecord(int A);
-
Create a test that constructs the record
var myRecord = new MyRecord(1);
Minimal Example: https://github.com/jlawrence/coverlet-missing-line-example/tree/main
Expected behavior
The record constructor should be covered regardless of the value of SkipAutoProps.
Actual behavior
Observed behavior: If SkipAutoProps is true, the record constructor will not be covered. If it is false, the record constructor will be covered.
Configuration:
* Coverlet package: "coverlet.collector" Version="6.0.0"
* .NET 8
* Windows 10 x64