summary refs log tree commit diff stats
path: root/tests/arc/tarc_macro.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arc/tarc_macro.nim')
-rw-r--r--tests/arc/tarc_macro.nim13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/arc/tarc_macro.nim b/tests/arc/tarc_macro.nim
index ea7d279fd..33ade1da4 100644
--- a/tests/arc/tarc_macro.nim
+++ b/tests/arc/tarc_macro.nim
@@ -43,4 +43,15 @@ macro bar2() =
     doAssert &%&%y == 1 # unary operator => need to escape
     doAssert y &% y == 2 # binary operator => no need to escape
     doAssert y == 3
-bar2()
\ No newline at end of file
+bar2()
+
+block:
+  macro foo(a: openArray[string] = []): string =
+    echo a # Segfault doesn't happen if this is removed
+    newLit ""
+
+  proc bar(a: static[openArray[string]] = []) =
+    const tmp = foo(a)
+
+  # bug #22909
+  doAssert not compiles(bar())