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

Remove else in exhaustive case over enums #5

Merged

Conversation

singularperturbation
Copy link
Contributor

Remove else from exhaustive case statements. In Nim 0.20.0 onward, doing an else when switching over an enum after covering all cases will result in an error.

Remove else from exhaustive case statements.  In Nim [0.20.0](https://nim-lang.org/blog/2019/06/06/version-0200-released.html) onward, doing an else when switching over an enum after covering all cases will result in an error.
@singularperturbation singularperturbation changed the title Remove else in exhaustive case over enums #1 Remove else in exhaustive case over enums Jun 16, 2019
Comment indentation
@andreaferretti
Copy link
Collaborator

This is unfortunate, since these .nim files are generated using c2nim. I am accepting the PR for now since it is definitely needed, but I wil open an issue against c2nim to avoid generating else clauses for exhaustive checks

@andreaferretti andreaferretti merged commit ccb9e18 into SciNim:master Jun 17, 2019
@andreaferretti
Copy link
Collaborator

Posted an issue here

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