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

fix: union types with multiple tagged variants not being decoded correctly #34

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

rmgaray
Copy link
Collaborator

@rmgaray rmgaray commented Jan 30, 2025

Whenever a union contains multiple variants that are encoded as a tagged CBOR item, the code generator needs to know which tags are expected when decoding each variant. This is not the case when there is a single tagged variant.

With this change, now the code generator will throw an error whenever the valid_tags field is not provided for each tagged variant in a union that has more than one tagged variant.

…ectly

Whenever a union contains multiple variants that are encoded as a tagged
CBOR item, the code generator needs to know which tags are expected
when decoding each variant. This is not the case when there is a single
tagged variant.

With this change, now the code generator will throw an error whenever
the valid_tags field is not provided for each tagged variant in a
union that has more than one tagged variant.
@rmgaray rmgaray merged commit 88d055d into master Jan 31, 2025
1 check passed
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.

2 participants