Skip to content

Generate Constructor should not copy "protected" from abstract base class #25238

@davkean

Description

@davkean
  1. CTRL+. on Abstract and choose Generate Constructor
public class Concrete : Abstract
{

}

public abstract class Abstract
{
    protected Abstract(string foo)
    {

    }
}

Expected:

public class Concrete : Abstract
{
    public Concrete(string foo) : base(foo)
    {
    }
}

public abstract class Abstract
{
    protected Abstract(string foo)
    {

    }
}

Actual:

public class Concrete : Abstract
{
    protected Concrete(string foo) : base(foo)
    {
    }
}

public abstract class Abstract
{
    protected Abstract(string foo)
    {

    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugResolution-FixedThe bug has been fixed and/or the requested behavior has been implemented

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions