I am working on a project where a JSON file is read, its keys are saved in a `Table[string, string]` and that table is then used in the returned proc. So what I would have thought is that I would have to capture the table like so: import std/tables, sugar proc getProc(): (proc()) = var tab: Table[string, string] capture tab: # Error return (proc() = echo "Hello World" ) Run
(This is the smallest example I could come up with that shows the issue) If I do that though, I get the following error: "A nested proc can have generic parameters only when it is used as an operand to another routine and the types of the generic paramers can be inferred from the expected signature." I don't understand what I am doing wrong here, since the nested proc has no parameters at all, not to mention generic ones. Also, I don't know what is meant by "the types of the generic paramers can be inferred from the expected signature" since I explicitly tell it that it is a `Table[string, string]`. So my question is, what am I doing wrong here? In case it helps, this is where the error occurs in my project: <https://github.com/Pasu4/animdustry/blob/72b579efc809b5e2244d76fbf6afc550610e4da1/src/jsonapi.nim#L593>