summary refs log tree commit diff stats
path: root/tests/template/tparams_gensymed.nim
blob: 4178812af6cf76596bcc74f690aa6775dcb7039e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)