diff options
author | Araq <rumpf_a@web.de> | 2015-01-12 01:43:25 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-01-12 02:00:37 +0100 |
commit | b9079b87134864a478ac453fd31363e6d8d86794 (patch) | |
tree | 0092602d8d248c4be2b300e9699a1bc710099ba9 /tests | |
parent | c87f1eb5813cca9ce5c1f251d9b3af3a2d47be71 (diff) | |
download | Nim-b9079b87134864a478ac453fd31363e6d8d86794.tar.gz |
fixes #1915
Diffstat (limited to 'tests')
-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) |