mirror of
https://github.com/sheumann/hush.git
synced 2024-08-14 11:28:58 +00:00
ad88bdee0c
Collapsing arithmetic expansion is incorrect when the inner arithmetic expansion is a part of a parameter expansion. Test case: unset a echo $((3 + ${a:=$((4 + 5))})) echo $a Old result: 12 (4 + 5) New result: 12 9 Based on commit bb777a6 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta readtoken1 3180 3163 -17 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
4 lines
47 B
Plaintext
Executable File
4 lines
47 B
Plaintext
Executable File
unset a
|
|
echo $((3 + ${a:=$((4 + 5))}))
|
|
echo $a
|