File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1111 omit base level for up-scope references; do not follow reference
1212 chains when computing base level of new references
1313
14+ * Philippe: 53796: Src/params.c, Test/K01nameref.ztst: fix local
15+ reference chains and detect self-reference across local scopes
16+
14172025-10-24 Oliver Kiddle <
[email protected] >
1518
1619 * 54002: Src/parse.c: silence compiler warning for static function
Original file line number Diff line number Diff line change @@ -6412,8 +6412,6 @@ setscope(Param pm)
64126412 stop .name = pm -> node .nam ;
64136413 stop .value .scalar = NULL ;
64146414 stop .flags = PM_NAMEREF ;
6415- if (locallevel && !(pm -> node .flags & PM_UPPER ))
6416- stop .flags |= PM_LOCAL ;
64176415 dont_queue_signals (); /* Prevent unkillable loops */
64186416 basepm = (Param )resolve_nameref (pm , & stop );
64196417 restore_queue_signals (q );
Original file line number Diff line number Diff line change @@ -1179,6 +1179,16 @@ F:previously this could create an infinite recursion and crash
11791179>typeset PS1=zz
11801180*?*
11811181
1182+ typeset -n ref1
1183+ typeset -n ref2=ref1
1184+ () {
1185+ typeset -n ref3=ref2
1186+ typeset ref2=foo
1187+ ref1=ref3
1188+ }
1189+ 1:self reference chain including a hidden reference
1190+ ?(anon):3: ref3: invalid self reference
1191+
11821192 zmodload -u zsh/random
11831193 echo z=${(M)${(f)${ zmodload -ap}}:#*SRANDOM*}
11841194 typeset -n ref=SRANDOM
You can’t perform that action at this time.
0 commit comments