diff options
Diffstat (limited to 'tests/template')
-rw-r--r-- | tests/template/tparams_gensymed.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/template/tparams_gensymed.nim b/tests/template/tparams_gensymed.nim new file mode 100644 index 000000000..4178812af --- /dev/null +++ b/tests/template/tparams_gensymed.nim @@ -0,0 +1,14 @@ + +# bug #1915 + +import macros + +# Test that parameters are properly gensym'ed finally: + +template genNodeKind(kind, name: expr): stmt = + proc name*(children: varargs[PNimrodNode]): PNimrodNode {.compiletime.}= + result = newNimNode(kind) + for c in children: + result.add(c) + +genNodeKind(nnkNone, None) |