diff options
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/tdumpast.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/macros/tdumpast.nim b/tests/macros/tdumpast.nim index e3388591a..3a26ffd2f 100644 --- a/tests/macros/tdumpast.nim +++ b/tests/macros/tdumpast.nim @@ -2,13 +2,13 @@ import macros -template plus(a, b: expr): expr {.dirty} = +template plus(a, b: untyped): untyped {.dirty} = a + b -macro call(e: expr): expr = +macro call(e: untyped): untyped = result = newCall("foo", newStrLitNode("bar")) -macro dumpAST(n: stmt): stmt {.immediate.} = +macro dumpAST(n: untyped): untyped = # dump AST as a side-effect and return the inner node let n = callsite() echo n.lispRepr @@ -17,7 +17,7 @@ macro dumpAST(n: stmt): stmt {.immediate.} = var plusAst = getAst(plus(1, 2)) echo plusAst.lispRepr - var callAst = getAst(call()) + var callAst = getAst(call(4)) echo callAst.lispRepr var e = parseExpr("foo(bar + baz)") |