Closed jrfondren closed 1 year ago
Thanks for the report. I have reproduced this and will look at it in the coming hours.
I think the current version control HEAD should work (even for your rather pathological empty enum string) case on Nim-0.20.2 up to nim-devel. E.g.,
type E = enum A = "", B = "B", C = "C"
proc bug(e: E) = echo len($e)
import cligen; dispatch bug
$ ./bug2 -e '' # produces "0\n"
If you need a release to test (e.g. via nimble) then I could punch one, but I'd probably prefer to wait a week or two. Let me know.
This program:
Responds with "one of: \<nothing>" when a bad
-e
is provided:Bonus
There's probably no helping this one:
usage: