summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-03-23 14:49:21 +0100
committerGitHub <noreply@github.com>2019-03-23 14:49:21 +0100
commit0cc6e124254a2222e04d1226fe9c362d20f38cd5 (patch)
tree03bbd1c925da0b773590d2d77f504b58ccc992cd /tests
parentf8146dfd845e8d9a8f19ae59ef9c9350cd9db453 (diff)
downloadNim-0cc6e124254a2222e04d1226fe9c362d20f38cd5.tar.gz
fixes #8202 (#10888)
* fixes #8202

* make tests green
Diffstat (limited to 'tests')
-rw-r--r--tests/cpp/tevalorder.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/cpp/tevalorder.nim b/tests/cpp/tevalorder.nim
new file mode 100644
index 000000000..f130cef6c
--- /dev/null
+++ b/tests/cpp/tevalorder.nim
@@ -0,0 +1,18 @@
+discard """
+  output: '''0
+1
+2'''
+target: "cpp"
+"""
+
+# bug #8202
+var current: int = 0
+
+proc gen(): string = current.inc; $(current - 1)
+
+proc allOut(a, b, c: string) =
+    echo a
+    echo b
+    echo c
+
+allOut(gen(), gen(), gen())