Skip to content

Code that throws System.Diagnostics.UnreachableException should not be counted as not covered. #1417

Open
@dnperfors

Description

@dnperfors

.NET 7 introduced the UnreachableException, which is basically meant to never been thrown. It is often used in switch statements where a default case is required by the compiler, but most of the time shouldn't be reached.
Coverlet shows the default case as uncovered, but it would be nice to not count this as not covered, since as the exception says the code can't normally be reached.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions