Skip to content

Code generator doesn't work with primary constructor #569

Description

@Flachdachs

When you change

public sealed class Action : IAction
{
public int Amount { get; }
public Action(int amount)
{
Amount = amount;
}
}

to use a primary constructor

        public sealed class Action(int amount) : IAction
        {
            public int Amount { get; } = amount;
        }

the code generator creates code without the parameter, and the code doesn't compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions