dotnet/roslyn
Asynchronous methods and variables not showing unused warning
Offen
#52.328 geöffnet am 01.04.2021
Area-IDEhelp wanted
Repository-Metriken
- Stars
- (20.414 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)
Beschreibung
Version Used: Version 16.9.0 Preview 3.0
Steps to Reproduce:
-
Set a variable to an asynchronous await call var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false))
-
Do not use the variable
-
Create an asynchronous method
-
Do not call the asynchronous method
Expected Behavior: Green underline appears underneath root and method header name indicating that the variable/method is unused.
Actual Behavior: The unused warning does not appear.
Note: I may be missing an option selection that would make it so the warning appears in this case, but I am unsure.