Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

#26 Check for nullness #27

Merged
merged 1 commit into from
Sep 18, 2024
Merged

#26 Check for nullness #27

merged 1 commit into from
Sep 18, 2024

Conversation

Tarmil
Copy link
Member

@Tarmil Tarmil commented Sep 18, 2024

  • Add a Nullness case to the Diff type.
  • The differ returns None when both values are null.
  • The differ returns Some(Value(x, y)) when the type being checked is a leaf type and exactly one of the values is null. (unchanged behavior)
  • The differ returns Some(Nullness(x, y)) when the type being checked is not a leaf type and exactly one of the values is null.
  • In the printer:
    • in the Nullness case, simply print "is null" for one value and "is not null" for the other.
    • in the leaf case, when one of the values is null, print "is null" for the null value and "= ..." for the non-null value.

@Tarmil Tarmil merged commit 8754452 into main Sep 18, 2024
10 checks passed
@Tarmil Tarmil deleted the nullness branch September 18, 2024 15:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant