AOT must accommodate `init` and `required` properties · Issue #1919 · MessagePack-CSharp/MessagePack-CSharp · GitHub
Skip to content

AOT must accommodate init and required properties #1919

Description

@AArnott

In migrating one of my apps to MessagePack v3, I hit a roadblock in that the auto-generated formatter doesn't use the object initializer syntax to set properties with init property accessors. As a result, the project no longer compiles.

Since the system already knows to deserialize property values required by the constructor before invoking the constructor, it should be a relatively simple matter to also collect init properties before invoking the constructor, and then to set the properties using object initializer syntax.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions