Skip to content

"Deconstruct variable declaration" introduces error. #25260

@CyrusNajmabadi

Description

@CyrusNajmabadi

Start with code:

        (int x, int y) t = default;
        Console.WriteLine(t.x + t.y);

Use 'Deconstruct variable declaration' on 't'. It produces the following code:

        (int x, int y) = default;
        Console.WriteLine(x + y);

This is not allowed because 'default' is not deconstructable to a tuple.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions