diff options
author | Peter Stephenson <pws@zsh.org> | 2017-09-05 13:15:30 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-09-05 13:15:30 +0100 |
commit | ea5b38935a17af38a328c8013e7eaf3c8de7ba09 (patch) | |
tree | c91701390f945d17ba5c69ad04198d577c88aaeb /Test/C01arith.ztst | |
parent | 5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c (diff) | |
download | zsh-ea5b38935a17af38a328c8013e7eaf3c8de7ba09.tar.gz zsh-ea5b38935a17af38a328c8013e7eaf3c8de7ba09.tar.xz zsh-ea5b38935a17af38a328c8013e7eaf3c8de7ba09.zip |
41641: Some math operations shouldn't be lvalues.
This includes pre- and post- increment and decrement. Simply mark all values after operations as rvalues.
Diffstat (limited to 'Test/C01arith.ztst')
-rw-r--r-- | Test/C01arith.ztst | 13 |
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 |