-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Description
Bug description
Repro steps
Code to reproduce the behavior.
class Class1
{
public Func<Task<Dictionary<string, int>>>? VCLoadMethod;
public Dictionary<string, int>? VirtualCurrencyBalances
{
get
{ // This has no issue:
// return VCLoadMethod?.Invoke().GetAwaiter().GetResult();
// This triggers the warning:
return (VCLoadMethod?.Invoke()).GetAwaiter().GetResult();
}
}
}While parentheses are pointless in this case, they may be needed in more complex constructs such as (VCLoadMethod?.Invoke() ?? Task.FromResult(default(Dictionary<string, int>))).GetAwaiter().GetResult();

Expected behavior
Expect no warning.
Actual behavior
VSTHRD110
- Version used:
- Application (if applicable):
Additional context
Add any other context about the problem here.