I think there's a related regression in the latest devel commit. Creating a
local variable with the same name as a higher-scoped nameref pointing to an
unset variable creates a local variable with the name of the target of the
nameref.
Starting with:
declare -n ref=var
f() { local ref=Y;
If `var' is declared but not set, performing an @A or @a
transformation on double-quoted `var[@]' or `var[*]' will trigger a
segfault in dequote_string.
This is present in 4.4 and devel.
bash -c 'declare var; echo "${var[@]@A}"'
Segmentation fault: 11
This seems like the easy fix:
diff
Though my motivation in reporting this was to point out the segfault, I'm a
bit confused by why compound assignment should be an error here.
> Bash is consistent in defaulting to indexed array variables when you don't
> specify -A and assign a value using the compound assignment syntax.
Since loc