Skip to content

Type check elem in insertvalue #70

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

Merged
merged 3 commits into from
Feb 25, 2019
Merged

Type check elem in insertvalue #70

merged 3 commits into from
Feb 25, 2019

Conversation

pwaller
Copy link
Member

@pwaller pwaller commented Feb 24, 2019

When inserting an element into an aggregate type, the type must match. Check it so that code doing this erroneously panics at the point of the mistake rather than producing ill-formed code. See discussion in #65.

Since #69 turned out to be more complicated than I first thought, I've broken out insertvalue into this PR.

Hopefully this is less complicated. I also added a simple test.

Also fixes #67.

@pwaller pwaller force-pushed the type-check-insertvalue branch from 2c6f31e to c3ac8f6 Compare February 24, 2019 18:03
@coveralls
Copy link

coveralls commented Feb 24, 2019

Coverage Status

Coverage increased (+0.1%) to 68.408% when pulling d428693 on type-check-insertvalue into 10a64da on master.

@pwaller pwaller force-pushed the type-check-insertvalue branch from c3ac8f6 to d428693 Compare February 24, 2019 20:24
Copy link
Member

@mewmew mewmew left a comment

Choose a reason for hiding this comment

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

LGTM.

@mewmew mewmew merged commit de8d3a2 into master Feb 25, 2019
@pwaller pwaller deleted the type-check-insertvalue branch February 25, 2019 12:15
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.

Missing Type call?
3 participants