Why am I getting a compiler error? Here is the program:
$ cat test.nim import parseopt2
var p = initOptParser(@["\--left", "\--debug:3", "-l=4", "-r:2"])
for kind, key, val in p.getopt():
echo kind
And here is the error:
$ nim c -r test.nim ... test.nim(4, 24) Error: type mismatch: got (OptParser)
but expected one of: iterator getopt(): GetoptResult
