Open Malivil opened 2 years ago
Thanks for reporting this.
This issue is stale because it has been open for 3 months with no activity.
Stale, but still an issue
This issue is stale because it has been open for 3 months with no activity.
Stale, but still an issue
@Malivil Please update repo.
Done, no change
verify branch coverage for C#9 (MSIL). Should be full coverage for and
operator.
C# 9 includes new pattern matching improvements:
- Type patterns match an object matches a particular type
- Parenthesized patterns enforce or emphasize the precedence of pattern combinations
- Conjunctive
and
patterns require both patterns to match- Disjunctive
or
patterns require either pattern to match- Negated
not
patterns require that a pattern doesn't match- Relational patterns require the input be less than, greater than, less than or equal, or greater than or equal to a given constant.
Package: coverlet.msbuild Version: 3.1.2 Format: opencover
Combining the C#7
is
with the C#9and
in a pattern-matchingif
, branch coverage is lower than the same check in traditional boolean logic.I created a simple repro of this because I cannot show the actual code that caused the problem (it's from my job).
is
+and
:Traditional:
Repro code: https://github.com/Malivil/Coverlet1313Repro