summary refs log tree commit diff stats
path: root/tests/template/twrong_getast.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/twrong_getast.nim')
-rw-r--r--tests/template/twrong_getast.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/template/twrong_getast.nim b/tests/template/twrong_getast.nim
new file mode 100644
index 000000000..1d158f7a5
--- /dev/null
+++ b/tests/template/twrong_getast.nim
@@ -0,0 +1,19 @@
+discard """
+  errormsg: "expected a template that takes 3 arguments"
+  line: 16
+"""
+
+import macros
+
+template grainBlock(proxyTypeName: untyped, proxyProcs: untyped): typed =
+  discard
+
+var
+  proxyTypeName: string
+  proxyProcs: string
+
+macro foo(): untyped =
+  let x = getAst grainBlock(proxyTypeName, proxyProcs, proxyTypeName)
+
+foo()
+