vs-threading icon indicating copy to clipboard operation
vs-threading copied to clipboard

VSTHRD200 does not produce diagnostics when response is nullable ValueTask

Open rafal-mz opened this issue 4 years ago • 0 comments

Bug description

Analyzer is reporting diagnostic when return type is:

  • Task
  • Task?
  • Task<T>
  • Task<T>?
  • ValueTask

Analyzer is not reporting diagnostic when used with:

  • ValueTask?
  • ValueTask<T>?

image image

Repro steps

1a. Create static empty class Class 2a. Create empty static method returning Task? 3a. Change returning type to ValueTask?

1b. Create static empty class Class 2b. Create empty static method returning Task<bool>? 3b. Change returning type to ValueTask<bool>?

Expected behavior

Analyzer still report dignostic about method name

Actual behavior

Analyzer doesn't report diagnostic.

  • Version used: 16.10.56
  • Application: VS studio 2022 RC

rafal-mz avatar Oct 21 '21 15:10 rafal-mz