summaryrefslogtreecommitdiffstats
path: root/Test/K01nameref.ztst
diff options
context:
space:
mode:
authorPhilippe Altherr <philippe.altherr@gmail.com>2025-10-26 17:05:44 -0700
committerBart Schaefer <schaefer@zsh.org>2025-10-26 17:05:44 -0700
commit78b7629361b63c3914edc6c77af57246b2d183a3 (patch)
tree825d8390a3ecea28905ced800dd10a436584ed62 /Test/K01nameref.ztst
parent53782: Src/params.c, Test/K01nameref.ztst: changes to nameref base level: (diff)
downloadzsh-78b7629361b63c3914edc6c77af57246b2d183a3.tar
zsh-78b7629361b63c3914edc6c77af57246b2d183a3.tar.gz
zsh-78b7629361b63c3914edc6c77af57246b2d183a3.tar.bz2
zsh-78b7629361b63c3914edc6c77af57246b2d183a3.tar.lz
zsh-78b7629361b63c3914edc6c77af57246b2d183a3.tar.xz
zsh-78b7629361b63c3914edc6c77af57246b2d183a3.tar.zst
zsh-78b7629361b63c3914edc6c77af57246b2d183a3.zip
53796: fix local reference chains and detect self-reference across local scopes
Diffstat (limited to 'Test/K01nameref.ztst')
-rw-r--r--Test/K01nameref.ztst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/K01nameref.ztst b/Test/K01nameref.ztst
index b03487d03..49a9a9d4d 100644
--- a/Test/K01nameref.ztst
+++ b/Test/K01nameref.ztst
@@ -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