Skip to content

Uncovered lines in .NET 8 #1555

Closed
Closed
@samuel-utbult-oborgen

Description

@samuel-utbult-oborgen

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

  1. Create a record.
  2. Create another record inheriting that record.
  3. Create a test using the second record.
  4. Run the test with test coverage.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existswith reproIssue with repro

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions