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

Recognize ValueTuple.Create() methods when setting tuple element nullability #32625

Open
cston opened this issue Jan 18, 2019 · 0 comments
Open

Comments

@cston
Copy link
Member

cston commented Jan 18, 2019

No warning should be reported for t.Item1.ToString():

class Program
{
    static void F(object x, string? y)
    {
        (object?, string?) t = System.ValueTuple.Create(x, y);
        t.Item1.ToString(); // ok
        t.Item2.ToString(); // warning
    }
}
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

4 participants