Closed SteveGilham closed 4 years ago
I've tried to find a solution to fix this special case. There is no good way to determine that the found class is not correct for the compiler generated class. Matching the name would work here, but would break other cases in my test suite.
I'm closing this for now.
I just spotted this unusual looking behaviour and wanted to at least get it on the record, even if the result is a "not worth fixing".
This coverage file coverage.opencover.xml.zip contains a class
AltCover.StaticFilter
that has a compiler generated member. When an HTML report is generated, some of the code associated with a lexically separate class (but actually belonging to a third, system generated, type) is shown in the HTML report here AltCover_StaticFilter.zip.I assume that the autogenerated types
<StartupCode$AltCover>.$Filter/get_Apply@48
and<StartupCode$AltCover>.$Filter/get_Apply@49-1
have been assigned to the lexically nearest type with some code location, rather than being exposed in all their weirdness to the unsuspecting consumer; but in this case, the end result does appear rather counter-intuitive.