summary refs log tree commit diff stats
path: root/tests/ccgbugs
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-10-14 13:58:36 +0200
committerGitHub <noreply@github.com>2020-10-14 13:58:36 +0200
commit89781124579fdf7fe884aca093ed9348195a57af (patch)
tree607eb2fc80fdb2eb6278215442628a7ee385b6f1 /tests/ccgbugs
parent09cad44be9153211317f3f4a998f054192ffe9fc (diff)
downloadNim-89781124579fdf7fe884aca093ed9348195a57af.tar.gz
fixes a C code generator regression, no need to backport, only the 1.4 line is affected (#15569)
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r--tests/ccgbugs/t2procs.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ccgbugs/t2procs.nim b/tests/ccgbugs/t2procs.nim
new file mode 100644
index 000000000..d8b7a2815
--- /dev/null
+++ b/tests/ccgbugs/t2procs.nim
@@ -0,0 +1,18 @@
+discard """
+  output: '''before
+1
+before
+2'''
+"""
+
+proc fn[T1, T2](a: T1, b: T2) =
+  a(1)
+  b(2)
+
+fn( (proc(x: int) =
+      echo "before" # example block, can span multiple lines
+      echo x),
+    (proc (y: int) =
+      echo "before"
+      echo y)
+)