Replies: 1 comment 1 reply
-
What's happening here is: a One common case we were seeing was the "linked list traversal" case, e.g. if we inferred a non-nullable reference type for for (var node = head; node != null; node = node.Next)
{
Visit(node);
} We made a change very recently to try and improve clarity when hovering on the declaration: dotnet/roslyn#79649 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm seeing an issue in VSCode where it always shows my return types as nullable, even when I don't expect them to be.
Here's a simplified example:
When I call this:
and hover over
test
, VSCode shows:but I feel it should just be:
If I add a null check like this:
the hover over
test
in the if condition shows:and the hover over
test
when I assigntest.Id = ""
shows:Why does VSCode always show the question mark in the hover? It feels misleading since my method's return type is not nullable.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions