The documentation states that with the substitution flag (!) the reference itself is examined, not its referent, but this fails in ${(!)ref::=var} substitutions:
% typeset var=foo
% typeset -n ref=var
% echo ${(!)ref::=bar}
bar
% typeset -p var ref
typeset var=bar
typeset -n ref=var
The result of the last command should be the following:
typeset var=foo
typeset -n ref=bar
-
Fix bang flag in ${(!)ref::=var} substitutions