aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/eval_order_operands.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conformance/3-expressions/eval_order_operands.zc')
-rw-r--r--tests/conformance/3-expressions/eval_order_operands.zc10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/conformance/3-expressions/eval_order_operands.zc b/tests/conformance/3-expressions/eval_order_operands.zc
new file mode 100644
index 0000000..a8f289c
--- /dev/null
+++ b/tests/conformance/3-expressions/eval_order_operands.zc
@@ -0,0 +1,10 @@
+// expect: 38/11/
+include rt;
+void pn(int x) { rt.put_n(x); rt.put_c(10); }
+fn main() {
+ int a = 18;
+ pn(a++ + ++a);
+ int j = 1;
+ pn(j + (j = 5) * 2);
+ return 0;
+}