SciNim / nimcuda

Nim bindings for CUDA
Apache License 2.0
42 stars 9 forks source link

Remove else in exhaustive case over enums #5

Closed singularperturbation closed 5 years ago

singularperturbation commented 5 years ago

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.

andreaferretti commented 5 years ago

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 commented 5 years ago

Posted an issue here