From 0cc6e124254a2222e04d1226fe9c362d20f38cd5 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 23 Mar 2019 14:49:21 +0100 Subject: fixes #8202 (#10888) * fixes #8202 * make tests green --- tests/cpp/tevalorder.nim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/cpp/tevalorder.nim (limited to 'tests') 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()) -- cgit 1.4.1-2-gfad0