Closed
Description
Describe the bug
When creating a record inheriting another record in a .NET 8 project, the initial line containing public record
is reported as not covered by tests even though the record is used in the tests.
To Reproduce
- Create a record.
- Create another record inheriting that record.
- Create a test using the second record.
- Run the test with test coverage.
- The line containing
public record
on the second record is reported as not tested.
Here is an example project showcasing the problem: https://github.com/samuel-utbult-oborgen/coverlet-missing-line-example
Expected behavior
The uncovered line should either be covered or ignored.
Actual behavior
The line is reported as uncovered.
Configuration
The following environment it used:
- coverlet 6.0.0
- .NET 8
- macOS Sonoma 14.0
- x64
- I have not encountered this problem in .NET 7 but coverlet 3.2.0 seems to have the same problem.