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

feat(experimental): Issue missing case error for match expressions #7560

Open
wants to merge 2 commits into
base: jf/unreachable-case-error
Choose a base branch
from

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Feb 28, 2025

Description

Problem*

Resolves

Summary*

Issues a missing case(s) error for match expressions missing any cases. This includes constructing an example of a value which fails to match.

Additional Context

Limitation: if the match doesn't match on any cases such as match foo {} we don't issue a helpful error like Missing cases Foo, Bar, Baz and instead issue Missing cases: _. This could be fixed but it is the end of the week so I wanted to get this work out.

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@jfecher jfecher requested a review from a team February 28, 2025 21:20
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