summary refs log tree commit diff stats
path: root/tests/macros/tdumpastgen.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/macros/tdumpastgen.nim')
-rw-r--r--tests/macros/tdumpastgen.nim25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/macros/tdumpastgen.nim b/tests/macros/tdumpastgen.nim
new file mode 100644
index 000000000..faed77225
--- /dev/null
+++ b/tests/macros/tdumpastgen.nim
@@ -0,0 +1,25 @@
+discard """
+msg: '''nnkStmtList.newTree(
+  nnkVarSection.newTree(
+    nnkIdentDefs.newTree(
+      newIdentNode(!"x"),
+      newEmptyNode(),
+      nnkCall.newTree(
+        nnkDotExpr.newTree(
+          newIdentNode(!"foo"),
+          newIdentNode(!"create")
+        ),
+        newLit(56)
+      )
+    )
+  )
+)'''
+"""
+
+# disabled; can't work as the output is done by the compiler
+
+import macros
+
+dumpAstGen:
+  var x = foo.create(56)
+