Skip to content

[BUG] Incorrect coverage for Linq Expression #1767

@kenneylo

Description

@kenneylo

Describe the bug
Line reports 100% coverage when it is not 100% covered

To Reproduce
Use a conditional linq expression
public IEnumerable<string> Exists(string name) { return _items.Where(x => x == name); }

Expected behavior
Same as MS test Coverage, line is partially covered
Image

Actual behavior
Coverage shows 100% coverage
Image

Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used?
coverlet.collector (6.0.4)
* Which version of .NET is the code running on?
.net 8
* What OS and version, and what distro if applicable?
windows 11 24H2
* What is the architecture (x64, x86, ARM, ARM64)?
x64
* Do you know whether it is specific to that configuration?
don't know

Additional context
Running via FCC (Fine Code Coverage) extension

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedTo be investigated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions