Refactored typeCheck to accept parent, fixing array/slice failing required check with empty values #436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Related too #334, the root cause seems to be that each element of an array is checked with
isEmptyValue
and fails therequired
check if it is empty. Meaning that an array of bytes containing a zero value of the byte type (0x00
) will trigger the failure. Solution is to check the array against the zero type first, then ignore any empty values upon digging into each individual element ofbyte
array. I've added a test to reproduce.Note:
IsExistingEmail
tests fail for me on a fresh pull frommaster
.This is just a quick hack together, I welcome some advice on the direction here.