Skip to content

Base constructor is disregarded if the base is not also marked with the attribute #3

@AntonC9018

Description

@AntonC9018

If I define a base class with a manual constructor, as you'd normally do:

public abstract class Base
{
    private readonly object _value;
    public Base(object v) => _value = v;
}

And then try and generate one for a derived class:

[QuickConstructor]
public sealed partial class Class : Base
{
}

It will generate invalid code, completely disregarding the base constructor. It works if you mark the base class with that though.

This could be helpful if you don't own the source code of the Base class and can't just go ahead and add the attribute to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions