-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct coverage for await using
(issue #914)
#1111
Correct coverage for await using
(issue #914)
#1111
Conversation
This commit corrects coverage for the `await using` statement added in C# 8, including the variant without an explicit scope (i.e., without curly braces and a body), by eliminating two kinds of patterns that arise in the async state machine that weren't already being detected and eliminated.
There are a couple of interesting things going on in this PR that I thought I should mention:
|
Added a missing comment describing one of the patterns we're searching for.
Okay, that's my last tweak until it's reviewed. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if we can avoid new helpers.
A part from that LGTM
Two adjustments for things that arose during code review: (1) Now using static local functions instead of non-static ones. (2) Removed InstructionHelpers class and reverted to straightforward ways of checking for instruction types.
After commit 56d124d: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Correct coverage for `await using`
This commit corrects coverage for the
await using
statement addedin C# 8, including the variant without an explicit scope (i.e.,
without curly braces and a body), by eliminating two kinds of
patterns that arise in the async state machine that weren't
already being detected and eliminated.