vs-threading
vs-threading copied to clipboard
VSTHRD200 does not produce diagnostics when response is nullable ValueTask
Bug description
Analyzer is reporting diagnostic when return type is:
TaskTask?Task<T>Task<T>?ValueTask
Analyzer is not reporting diagnostic when used with:
ValueTask?ValueTask<T>?

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