Skip to content

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

Merged
jfecher merged 6 commits intojf/unreachable-case-errorfrom
jf/missing-case-error
Mar 5, 2025
Merged

feat(experimental): Issue missing case error for match expressions#7560
jfecher merged 6 commits intojf/unreachable-case-errorfrom
jf/missing-case-error

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. This has been implemented along with ranges for integers (see tests).

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
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: b3ed7d7 Previous: 223656f Ratio
ram_blowup_regression 20.7 s 14.9 s 1.39

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Compilation Memory'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: b3ed7d7 Previous: 223656f Ratio
rollup-block-root-empty 365.29 MB 302.97 MB 1.21
rollup-merge 363.71 MB 301.39 MB 1.21

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Execution Memory'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: b3ed7d7 Previous: 223656f Ratio
rollup-merge 348.27 MB 289.87 MB 1.20

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

@jfecher jfecher merged commit 855d2b6 into jf/unreachable-case-error Mar 5, 2025
29 checks passed
@jfecher jfecher deleted the jf/missing-case-error branch March 5, 2025 14:58
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