Skip to content

Generate overrides doesn't work correctly for simple records #48295

@Youssef1313

Description

@Youssef1313
namespace ConsoleApp20
{
    public record A
    {
        public virtual void OverrideMe() { }
    }

    public record B$$ : A;
}

Invoke Ctrl+. on $$ and choose Generate overrides, check "OverrideMe" from the dialog.

Expected behavior

Remove the semicolon and use { }, and place the overridden method in braces.

Actual behavior

namespace ConsoleApp20
{
    public record A
    {
        public virtual void OverrideMe() { }
    }

    public record B : A public override void OverrideMe()
    {
        base.OverrideMe();
    };
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions