diff options
author | Araq <rumpf_a@web.de> | 2017-03-18 20:57:45 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-03-18 20:57:45 +0100 |
commit | aa4260ffa86cf4059bad71587364194bef141de0 (patch) | |
tree | a26d0a759b064838d4b2a003031447e136501c67 /tests/macros | |
parent | 242fb3240f0a5f96952f3cd8902341f3ec701ca2 (diff) | |
download | Nim-aa4260ffa86cf4059bad71587364194bef141de0.tar.gz |
overloading resolution for getAst; breaking change
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)") |