summary refs log tree commit diff stats
path: root/tests/macros/trecmacro.nim
blob: d804178bc17fcf0d744967612ae3818112c56d8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  errormsg: "recursive dependency: 'dump'"
  file: "trecmacro.nim"
  line: 8
"""

macro dump(n: untyped): untyped =
  dump(n)
  if kind(n) == nnkNone:
    nil
  else:
    hint($kind(n))
    for i in countUp(0, len(n)-1):
      nil