coverlet icon indicating copy to clipboard operation
coverlet copied to clipboard

Return in await using without braces in if statement has uncovered line

Open manuelamateo opened this issue 3 years ago • 2 comments

I may have discovered a wrong line coverage. To reproduce it four different circumstances must be met:

  1. Use await using (only using works correctly)
  2. await using must be inside a if statement (maybe reproduction works with other statements too)
  3. await using must be used without braces
  4. A value must be returned in context of using inside the if statement

See reproduction https://github.com/meggima/coverlet-reproductions AwaitUsingReturnInIfStatementReproduction.cs & AwaitUsingReturnInIfStatementReproductionFixture.cs

image

Thank you for steadily improving this software!

manuelamateo avatar May 10 '22 16:05 manuelamateo

Thanks for reporting this. 🙏

daveMueller avatar May 14 '22 19:05 daveMueller

This issue is stale because it has been open for 3 months with no activity.

github-actions[bot] avatar Sep 04 '23 00:09 github-actions[bot]