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

Add leaf? distinction to TypeKind #4352

Merged
merged 3 commits into from
Feb 20, 2023

Conversation

gmac
Copy link
Contributor

@gmac gmac commented Feb 18, 2023

What

In this PR, I'd propose formalizing a proper leaf? distinction on TypeKind.

Why?

At present, TypeKind provides a fields? distinction (Object + Interface) that is a bit awkward because it slices across both Composite and Leaf distinctions...

  • fields? != Composite, because it omits Union.
  • !fields? != Leaf, because it includes Union, which is not a Leaf.

This ambiguity leads to awkward situations:

@rmosolgo rmosolgo added this to the 2.0.18 milestone Feb 20, 2023
@rmosolgo
Copy link
Owner

Thanks for the improvement! I agree this makes sense.

@rmosolgo rmosolgo merged commit d265f4a into rmosolgo:master Feb 20, 2023
@gmac gmac deleted the gmac/add_leaf_distinction branch February 20, 2023 18: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.

2 participants