summary refs log tree commit diff stats
path: root/tests/cpp/tevalorder.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cpp/tevalorder.nim')
-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..4764f3aca
--- /dev/null
+++ b/tests/cpp/tevalorder.nim
@@ -0,0 +1,18 @@
+discard """
+  output: '''0
+1
+2'''
+targets: "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())