You're welcome, and I'm very glad you didn't give up so quickly! FWIW, I was not sure it was a problem with that version of Nim -- only that when I changed the type environment enough to compile your code that it worked for me on a devel version. In the future, providing more whole code context (even if only a link to a github repo) may help you get more precise guidance.
Having confidence getting a fresh devel build going will pay off someday, though, esp. if your OS package manager has one as old as 0.19.0. Even just more people submitting pull requests for stdlib documentation/API tweaks can help, and PRs usually make more sense to do against devel HEAD.