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

Missing warnings for mismatching nullability in deconstructing declarations/assignments #31298

Closed
TessenR opened this issue Nov 21, 2018 · 2 comments

Comments

@TessenR
Copy link

TessenR commented Nov 21, 2018

Version Used:

Branch C# 8.0: Nullable reference type (29 Oct 2018)
https://github.com/dotnet/csharplang/blob/master/proposals/nullable-reference-types.md
Latest commit 2f8fef by AlekseyTs:
Compare Nullable modifiers while comparing type symbols by default. (#30770)

Steps to Reproduce:

#nullable enable 
class C
{
    void M()
    {
        (string x, string y) = (null, null);
    }
}

https://sharplab.io/#v2:EYLgZgpghgLgrgJwgZwLQDk4BstWFiAJQkiQDsBjCAFQE8AHFAHwGIztd8IACCMvAtwCwAKAACAJm4BhUQG9R3JdzEAWbgFkAFAEpFyhSOXHuWsQEYADNwAeAGhVXutHdwC8p9jgdesOgNz6SgC+osFAA===

Expected Behavior:

warning CS8600: Converting null literal or possible null value to non-nullable type.

Actual Behavior:

No warnings

@jaredpar
Copy link
Member

jaredpar commented Jan 2, 2019

@cston pretty sure this is related to your tuples conversion work. Not sure if there is a dupe issue (didn't see one at a glance).

@vcsjones
Copy link
Member

Still present in preview2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants