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

convert: fix panic when converting nested objects #53

Merged
merged 1 commit into from
May 18, 2020

Conversation

mildwonkey
Copy link
Contributor

When converting a list of objects, it is necessary to unify the types of
the child elements. Previously Convert would panic if the nested objects had inconsistent element types.

This PR is nearly identical to #47, but handles lists of objects.

When converting a list of objects, it is necessary to unify the types of
the child elements.

This PR is very similar to zclconf#47, but handles lists of objects.
@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #53 into master will increase coverage by 0.10%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
+ Coverage   70.36%   70.47%   +0.10%     
==========================================
  Files          79       79              
  Lines        7110     7126      +16     
==========================================
+ Hits         5003     5022      +19     
+ Misses       1663     1661       -2     
+ Partials      444      443       -1     
Impacted Files Coverage Δ
cty/convert/conversion_collection.go 81.54% <71.42%> (-1.17%) ⬇️
cty/convert/compare_types.go 97.61% <0.00%> (-2.39%) ⬇️
cty/convert/mismatch_msg.go 70.87% <0.00%> (+1.94%) ⬆️
cty/function/stdlib/format_fsm.go 95.58% <0.00%> (+3.02%) ⬆️
cty/convert/unify.go 84.48% <0.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8158450...4991618. Read the comment docs.

Copy link
Collaborator

@apparentlymart apparentlymart left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good to me.

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