summary refs log tree commit diff stats
path: root/tests/macros
diff options
context:
space:
mode:
Diffstat (limited to 'tests/macros')
-rw-r--r--tests/macros/t7723.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/macros/t7723.nim b/tests/macros/t7723.nim
new file mode 100644
index 000000000..e1d0a8a8d
--- /dev/null
+++ b/tests/macros/t7723.nim
@@ -0,0 +1,19 @@
+discard """
+  msg: '''
+proc init(foo128049: int; bar128051: typedesc[int]): int =
+  foo128049
+'''
+"""
+
+import macros
+
+macro foo1(): untyped =
+  result = newStmtList()
+  result.add quote do:
+    proc init(foo: int, bar: typedesc[int]): int =
+      foo
+
+expandMacros:
+  foo1()
+
+doAssert init(1, int) == 1