about summary refs log tree commit diff
path: root/Test/C01arith.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/C01arith.ztst')
-rw-r--r--Test/C01arith.ztst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst
index 61da763ac..30409adf3 100644
--- a/Test/C01arith.ztst
+++ b/Test/C01arith.ztst
@@ -420,3 +420,16 @@
 0:type of variable when created in arithmetic context
 >integer
 >scalar
+
+  integer a=1
+  print $(( ++a * 2 ))
+  print $(( ++a ))
+  print $(( a++ * 2 ))
+  print $(( a ))
+  print $(( ++a++ * 2 ))
+1: Allow rvalue but not lvalue operations with result of increment
+>4
+>3
+>6
+>4
+?(eval):6: bad math expression: lvalue required