Version Used:
17.14.12
Steps to Reproduce:
public readonly struct MyStruct
{
$$
}
Execute propr snippet at $$
Expected Behavior:
No compiler error after I insert the snippet
Actual Behavior:
Inserted snippet looks like this:
public readonly struct MyStruct
{
public required int MyProperty { get; }
}
This results in a compiler error CS9034: Required member ... must be settable
I think the best solution here is to add init setter since this is most likely what user wants:
public readonly struct MyStruct
{
public required int MyProperty { get; init; }
}