I'm a beginer.And I'm writing some code to measure the execution times of proc.
However, when I nest template, I get some error Error: expression 'mySleep([1, 2, 3])' has no type (or is ambiguous). code in -> https://play.nim-lang.org/#ix=1Y5M . Namely template inner*(myFunc: untyped): TimeInt in Line 67
Without nesting, I get the right result, code in -> https://play.nim-lang.org/#ix=1Y5N . I split template inner into some changes in Line 79 and Line 89.
I don't know why.
Nesting templates is fine. The problem is myFunc.inner instead of inner(myFunc). For templates it best to use the call foo(a, b, c), or command foo a, b, c syntax.
See: https://nim-lang.github.io/Nim/manual.html#templates-limitations-of-the-method-call-syntax