Skip to content

Copy nullable state through implicit and explicit tuple conversions #32599

@cston

Description

@cston

The following should report warnings for u1.Item1 and u2.Item1 only:

class Program
{
    static void F1((string?, string) t1)
    {
        (object?, object?) u1 = t1;
        u1.Item1.ToString(); // warn
        u1.Item2.ToString();
    }

    static void F2((object?, object) t2)
    {
        var u2 = ((string?, string?))t2;
        u2.Item1.ToString(); // warn
        u2.Item2.ToString();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions