mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-24 00:05:25 +00:00
fixes #140
This commit is contained in:
@@ -18,13 +18,3 @@ macro test*(a: stmt): stmt =
|
||||
|
||||
test:
|
||||
"hi"
|
||||
|
||||
macro dump(n: stmt): stmt =
|
||||
dump(n)
|
||||
if kind(n) == nnkNone:
|
||||
nil
|
||||
else:
|
||||
hint($kind(n))
|
||||
for i in countUp(0, len(n)-1):
|
||||
nil
|
||||
|
||||
|
||||
14
tests/reject/trecmacro.nim
Normal file
14
tests/reject/trecmacro.nim
Normal file
@@ -0,0 +1,14 @@
|
||||
discard """
|
||||
file: "trecmacro.nim"
|
||||
line: 8
|
||||
errormsg: "recursive dependency: 'dump'"
|
||||
"""
|
||||
|
||||
macro dump(n: stmt): stmt =
|
||||
dump(n)
|
||||
if kind(n) == nnkNone:
|
||||
nil
|
||||
else:
|
||||
hint($kind(n))
|
||||
for i in countUp(0, len(n)-1):
|
||||
nil
|
||||
Reference in New Issue
Block a user