Skip to content

Fix problems in checking that a constructor is uninhabited for exhaustive match checking #23403

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Alex1005a
Copy link
Contributor

  1. If the field with bottom type is lazy, then the constructor is inhabited.
  2. Now it is taken into account that the type member can be Nothing and the field can be this type member.
  3. The check has been moved to the inhabited function, allowing some changes to be reverted from Do not consider uninhabited constructors when performing exhaustive match checking #21750

I was also thinking about making the check recursive, i.e. checking that all fields are inhabited. This could cause problems with cycles and performance, so I'm not sure whether to do it.

@Alex1005a Alex1005a marked this pull request as ready for review June 22, 2025 17:32
@Alex1005a Alex1005a force-pushed the bottom-types-coverage-fix branch from 584b8e1 to 0696aec Compare June 22, 2025 19:47
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.

1 participant