Using C#8, Visual Studio 2019 16.7.2, given the following C# code:
#nullable enable
public async Task<string> GetStringAsync(); ...
public async void Main()
{
var theString = await GetStringAsync();
...
}
Intellisense hovering over theString shows a tooltip of local variable (string?) theString
My GetStringAsync method never returns a nullable string, yet the variable is inferred as being nullable.
Is this an intellisense bug? Or is there something deeper going on where theString can actually be null due to some way that await works?