Say I have the Code Block: template test1(a : untyped) : untyped = template test2() : untyped = echo a test2() Run
Whats the best practice to ensure I don't have access to test2 outside of test1? I would normally use a proc but passing untyped data seems to be a problem with them. Here's some code that's closer to what I'm actually trying to do. template test1(body : untyped) : NimNode = template test2 () : untyped = body getAst(test2()) Run When I replace template test1 with proc test1 it complains about undeclared identifiers in body.