Skip to content

"Generate method" drops verbatim identifiers from value tuple names #80979

@jhinder

Description

@jhinder

Version Used: VS 18.0.0 Insiders [11123.170]

Steps to Reproduce:
Open the lightbulb menu on the M2 token and select "Generate method 'M2'".

class C
{
    void M1()
    {
        (char @char, int @int) x = M2();
    }
}

Expected Behavior:
The following method is generated (verbatim identifiers are retained to get legal code):

private (char @char, int @int) M2()
{
    throw new NotImplementedException();
}

Actual Behavior:
The following method is generated, which results in lots of compiler errors.

private (char char, int int) M2()
{
    throw new NotImplementedException();
}

The same happens for all other "Generate" commands (property, field, etc).

Metadata

Metadata

Assignees

Labels

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