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 warning for unreachable rule in pattern matching functions #736

Closed
developedby opened this issue Oct 22, 2024 · 0 comments · Fixed by #737
Closed

Add warning for unreachable rule in pattern matching functions #736

developedby opened this issue Oct 22, 2024 · 0 comments · Fixed by #737
Labels
CLI About Bend's CLI compilation Compilation of terms and functions to HVM enhancement New feature or request

Comments

@developedby
Copy link
Member

Consider this program

(Bool/not Bool/true) = Bool/False
(Bool/not Bool/False) = Bool/True

The second rule is not actually reachable because we mispelled True in the first one, so it's taken as a variable pattern.

Users have no indication that this happened even though it's almost always a mistake. We want this to throw a warning instead.

@developedby developedby added enhancement New feature or request compilation Compilation of terms and functions to HVM CLI About Bend's CLI labels Oct 22, 2024
@developedby developedby linked a pull request Oct 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI About Bend's CLI compilation Compilation of terms and functions to HVM enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant