Vogen icon indicating copy to clipboard operation
Vogen copied to clipboard

using static constructor -> VOG008

Open if1live opened this issue 8 months ago • 1 comments

Describe the bug

static constructor raise compile error

VOG008: Cannot have user defined constructors, please use the From method for creation.

Steps to reproduce

[ValueObject<int>]
public readonly partial struct Item
{
    static Item()
    {
    }
}

VOG008: Cannot have user defined constructors, please use the From method for creation.

Expected behaviour

compile success without error

if1live avatar Mar 31 '25 02:03 if1live

Hi, thanks for the feedback. Can I ask what functionality you need in the static construct (maybe Vogen is missing something useful that could be baked in?)

SteveDunn avatar Mar 31 '25 06:03 SteveDunn