Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AntonC9018 opened this issue Jun 23, 2023 · 0 comments

Comments

@AntonC9018
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant