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: sum type tag elision logic reversed #18

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Conversation

doug-q
Copy link
Collaborator

@doug-q doug-q commented Jun 13, 2024

No description provided.

@@ -290,7 +290,7 @@ impl<'c> LLVMSumType<'c> {
}

fn sum_type_has_tag_field(st: &SumType) -> bool {
st.num_variants() < 2
st.num_variants() >= 2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

awkward. sum types should have an i32 tag field when they have more than one variant. Logic was reversed, so nearly all tests change.

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@doug-q doug-q requested a review from peter-campora June 13, 2024 06:28
@aborgna-q aborgna-q self-requested a review June 14, 2024 09:14
Copy link
Collaborator

@aborgna-q aborgna-q left a comment

Choose a reason for hiding this comment

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

Good catch!

@doug-q doug-q added this pull request to the merge queue Jun 14, 2024
Merged via the queue into main with commit b63c619 Jun 14, 2024
10 checks passed
@doug-q doug-q deleted the doug/fix-sum-tag-elision branch June 14, 2024 09:36
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.

3 participants