-
-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Description
Hi, when I have a class like:
[MemoryPackable(GenerateType.CircularReference)]
public partial class MyClass
{
[MemoryPackOrder(0)]
public MyOtherClass? Parent { get; set; }
[MemoryPackOrder(1)]
public required string Key {get; set;} = string.Empty;
}
It gives me an error:
Required member 'MyClass.Key' must be set in the object initializer or attribute constructor.
The error is inside generated file: MyClass.MemoryPackFormatter.g.cs inside Deserialize method:
if (value == null)
{
value = new MyClass();
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels