mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
53796: fix local reference chains and detect self-reference across local scopes
This commit is contained in:
committed by
Bart Schaefer
parent
e1fed5439c
commit
78b7629361
@@ -1179,6 +1179,16 @@ F:previously this could create an infinite recursion and crash
|
||||
>typeset PS1=zz
|
||||
*?*
|
||||
|
||||
typeset -n ref1
|
||||
typeset -n ref2=ref1
|
||||
() {
|
||||
typeset -n ref3=ref2
|
||||
typeset ref2=foo
|
||||
ref1=ref3
|
||||
}
|
||||
1:self reference chain including a hidden reference
|
||||
?(anon):3: ref3: invalid self reference
|
||||
|
||||
zmodload -u zsh/random
|
||||
echo z=${(M)${(f)${ zmodload -ap}}:#*SRANDOM*}
|
||||
typeset -n ref=SRANDOM
|
||||
|
||||
Reference in New Issue
Block a user