Skip to content

Fix type mixups of ra_index() and ra_term() #542

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 1 commit into from
May 24, 2025
Merged

Conversation

the-mikedavis
Copy link
Collaborator

This is a cosmetic change since the dialyzer isn't smart enough yet to notice the mixup. With the addition of nominal types in OTP 28 though we will eventually be able to get the dialyzer to notice this. I played around with nominal types on OTP 28 in this branch and the dialyzer found these mixups.

Note that in practice #request_vote_rpc{} and #pre_vote_rpc{} are being constructed correctly with ra_term()s in these fields, so this isn't a bug fix.

This is a cosmetic change since the dialyzer isn't smart enough yet to
notice the mixup. With the addition of nominal types in OTP 28 though we
will eventually be able to get the dialyzer to notice this.

Note that in practice `#request_vote_rpc{}` and `#pre_vote_rpc{}` are
being constructed correctly with `ra_term()`s in these fields, so this
isn't a bug fix.
@the-mikedavis the-mikedavis self-assigned this May 23, 2025
@the-mikedavis the-mikedavis requested a review from kjnilsson May 23, 2025 18:19
@michaelklishin michaelklishin merged commit 1009f77 into main May 24, 2025
3 checks passed
@michaelklishin michaelklishin deleted the md/type-os branch May 24, 2025 01:02
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