You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An async method containing a synchronous local function doesn't trigger VSTHRD110 if that local function calls unawaited task methods.
Repro steps
asyncTaskDoOperationAsync(){// Warning CS4014 as expectedHelperAsync();DoOperationInner();return;voidDoOperationInner(){// No warning, would expect VSTHRD110?HelperAsync();}}voidDoOperation(){// Raises VSTHRD110 as expectedHelperAsync();}TaskHelperAsync(){// e.g. some helper method doing some async workreturnTask.CompletedTask;}
Expected behavior
A VSTHRD110 warning on the call to HelperAsync inside DoOperationInner
Actual behavior
No warning is raised
Version used:
Microsoft.VisualStudio.Threading.Analyzers v17.12.19
Additional context
Thank you very much for the work you do on these analysers, they are super helpful at preventing issues in my code!
Cheers
The text was updated successfully, but these errors were encountered:
Bug description
An async method containing a synchronous local function doesn't trigger VSTHRD110 if that local function calls unawaited task methods.
Repro steps
Expected behavior
A VSTHRD110 warning on the call to
HelperAsync
insideDoOperationInner
Actual behavior
No warning is raised
Microsoft.VisualStudio.Threading.Analyzers v17.12.19
Additional context
Thank you very much for the work you do on these analysers, they are super helpful at preventing issues in my code!
Cheers
The text was updated successfully, but these errors were encountered: