summary refs log tree commit diff stats
path: root/tests/pragmas/tpush.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pragmas/tpush.nim')
-rw-r--r--tests/pragmas/tpush.nim25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pragmas/tpush.nim b/tests/pragmas/tpush.nim
index 8ebbfe3d3..cb411714e 100644
--- a/tests/pragmas/tpush.nim
+++ b/tests/pragmas/tpush.nim
@@ -99,3 +99,28 @@ block: # bug #23019
   k(w)
   {.pop.}
   {.pop.}
+
+{.push exportC.}
+
+block:
+  proc foo11() =
+    const factor = [1, 2, 3, 4]
+    doAssert factor[0] == 1
+  proc foo21() =
+    const factor = [1, 2, 3, 4]
+    doAssert factor[0] == 1
+
+  foo11()
+  foo21()
+
+template foo31() =
+  let factor = [1, 2, 3, 4]
+  doAssert factor[0] == 1
+template foo41() =
+  let factor = [1, 2, 3, 4]
+  doAssert factor[0] == 1
+
+foo31()
+foo41()
+
+{.pop.}