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

Do not consider uninhabited constructors when performing exhaustive match checking #21750

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Alex1005a
Copy link

During exhaustive match checking, you can suppress warnings for cases where a constructor contains a field of type Nothing, because it is impossible to obtain an instance of this constructor. For example, Haskell and Ocaml do not issue a warning if the case of a constructor that has a field with type Void is not covered.

@Alex1005a Alex1005a marked this pull request as draft October 10, 2024 23:01
@Alex1005a Alex1005a force-pushed the bottom-types-coverage-checking branch from b61af65 to d459140 Compare October 11, 2024 20:19
@Alex1005a
Copy link
Author

I changed two tests because the compiler now correctly warns about the unreachable case.

@Alex1005a Alex1005a marked this pull request as ready for review October 11, 2024 21:17
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