The fix in the most recent push did not fix the issue:
$ x=([9223372036854775805]=foo)
$ x+=( {1..5} )
$ echo "${x[@]}"
3 4 5 foo 1 2
It behaves exactly the same way: no error is printed, some elements are
prepended instead of appended, and there are invalid indices in the
output of declare -p .
I think the fix only makes bash error when you use +=(...) and, before
the assignment, the max index of the array is already INT_MAX.
What I would have expected was something like this:
$ x=([9223372036854775805]=foo)
$ x+=( {1..5} ); echo "this won't run"
bash: some "invalid assignment" error
$ declare -p x # no value gets appended since there was an error
declare -a x=([9223372036854775805]="foo")
o/
emanuele6