Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline hints display incorrect nullability when NRT's enabled #66937

Closed
Eli-Black-Work opened this issue Feb 17, 2023 · 1 comment
Closed

Inline hints display incorrect nullability when NRT's enabled #66937

Eli-Black-Work opened this issue Feb 17, 2023 · 1 comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@Eli-Black-Work
Copy link

Consider the following code:

#nullable enable

public class Example
{
    private void Main()
    {
        // The `user` tooltip on this line shows `object?`, but it should be `object`
        var user = new object();
    }
}

On the line var user = new object(), VS shows user as being of type object?, but it should be of type object.

This is especially confusing when the VS setting Display inline type hints is enabled:

inline hints and NRT

This issue is similar to #66854 and #44063, but I think it deserves it's own issue 🙂

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 17, 2023
@Eli-Black-Work
Copy link
Author

Never mind; it looks like this is already covered by #63959 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant