Skip to content

fix: return correct xml type for bool#119

Merged
vinitkumar merged 1 commit into
masterfrom
fix/boolean-bug-118
Apr 18, 2022
Merged

fix: return correct xml type for bool#119
vinitkumar merged 1 commit into
masterfrom
fix/boolean-bug-118

Conversation

@vinitkumar

Copy link
Copy Markdown
Owner

As discussed nicely in the issue
#118, the correct bool
value is never returned as the bool is also a subtype of numbers.Number
and int.

Here, hence, the check for bool is done first because while the above
condition might be true for bool, no other type can say the same for
bool check. i.e. Numbers won't be an instance of bool and so would be
int.

A test is added to guard against the future regression on this as well.

Authored-by: Vinit Kumar vinit.kumar@kidskonnect.nl
Signed-off-by: Vinit Kumar vinit.kumar@kidskonnect.nl

As discussed nicely in the issue
#118, the correct bool
value is never returned as the bool is also a subtype of numbers.Number
and int.

Here, hence, the check for bool is done first because while the above
condition might be true for bool, no other type can say the same for
bool check. i.e. Numbers won't be an instance of bool and so would be
int.

A test is added to guard against the future regression on this as well.

- Github Issue: Resolves #118

Authored-by: Vinit Kumar <vinit.kumar@kidskonnect.nl>
Signed-off-by: Vinit Kumar <vinit.kumar@kidskonnect.nl>
@vinitkumar vinitkumar merged commit aa19b32 into master Apr 18, 2022
@vinitkumar vinitkumar deleted the fix/boolean-bug-118 branch April 18, 2022 09:00
@vinitkumar vinitkumar restored the fix/boolean-bug-118 branch June 14, 2026 17:18
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.

Boolean types are not converted to their XML equivalents.

1 participant