Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boxed enum serialization #197

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mcm2020
Copy link
Contributor

@mcm2020 mcm2020 commented Jun 21, 2022

Reproducing the serialization/deserialization issue for boxed enums that have a generated serializer.

writer.WriteFieldHeaderExpected(fieldIdDelta, WireType.VarInt);
// When WriteFieldHeaderExpected() is used, the boxed enum will not deserialized correctly
//writer.WriteFieldHeaderExpected(fieldIdDelta, WireType.VarInt);
writer.WriteFieldHeader(fieldIdDelta, expectedType, CodecFieldType, WireType.VarInt);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite right: the 'actual' type should be the enum type, but this would result in 'int'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants