Skip to content

Init properties aren't deserialized #438

@AdamJachocki

Description

@AdamJachocki

Hi, if I have a class with init properties:

[MemoryPackable(GenerateType.CircularReference, SerializeLayout.Sequential)]
public partial class MyClass
{
    public string? Data { get; init; }
}

then Data property is not deserialized. Although original object has real value in this property, also serialized object has, but during deserialization is not assigned at proper time and it's just lost.

Also MemoryPack constructor cannot be used, because it expects a parameterless constructor in CircularReference generation.

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