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

Fix unsoundness in AlgebraicValue::type_of by making it partial #1189

Merged
merged 4 commits into from
May 3, 2024

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Apr 30, 2024

Description of Changes

First we reduce the number of .type_of() calls to one.
Then we make the method sound by making it partial without an answer in e.g., the case of sums.
Also cleans up the bsatn roundtrip test.

Fixes #104.

API and ABI breaking changes

None

Expected complexity level and risk

1

@Centril Centril requested a review from joshua-spacetime May 1, 2024 19:42
Copy link
Contributor

@kazimuth kazimuth left a comment

Choose a reason for hiding this comment

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

This is more correct, 👍

I'm curious, what is this API currently used for?

@Centril
Copy link
Contributor Author

Centril commented May 3, 2024

I'm curious, what is this API currently used for?

The only remaining use is in Header::project as seen in the diff.

@Centril Centril enabled auto-merge May 3, 2024 21:57
@Centril Centril added this pull request to the merge queue May 3, 2024
Merged via the queue into master with commit fcc326b May 3, 2024
6 checks passed
@Centril Centril deleted the sound-type-of branch May 14, 2024 18:57
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.

Unsoundness in type_of_sum returning a product, not sum type
3 participants