Skip to content

Conversation

@nrwiersma
Copy link
Member

This fixes a potential bug where map record decodes where optimised changing how unions are decoded.

See aa7f619#diff-76d79b5f35aac6861a49a410fbb009f12801faadce2db0f35d21f4c50bfe3796R279

Fixes #386

@nrwiersma nrwiersma self-assigned this Aug 6, 2024
@nrwiersma
Copy link
Member Author

@redaLaanait If you have a moment can you check this out please.

@redaLaanait
Copy link
Contributor

redaLaanait commented Aug 7, 2024

This fix LGTM:

It seems that EfaceDecoder should not be used directly In the case of Union with a receiver-of-type interface. This condition was added to the decoderOfType factory here

The optimization change you pointed out does omit this check as it uses the newEfaceDecoder instead of passing through the factory.

@nrwiersma nrwiersma merged commit 9e78adb into main Aug 7, 2024
@nrwiersma nrwiersma deleted the fix-record-decodes branch August 7, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Decoding of map[string]any behavior changed

3 participants