diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-06-19 14:33:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 08:33:38 +0200 |
commit | 646bd99d461469f08e656f92ae278d6695b35778 (patch) | |
tree | 9929267c811c74c730eea09e30b32415037954de /tests/pragmas/tpush.nim | |
parent | e64512036289434c6a7b377f52a50189beae75e8 (diff) | |
download | Nim-646bd99d461469f08e656f92ae278d6695b35778.tar.gz |
[backport] fixes #23711; C code contains backtick`gensym (#23716)
fixes #23711
Diffstat (limited to 'tests/pragmas/tpush.nim')
-rw-r--r-- | tests/pragmas/tpush.nim | 25 |
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.} |