From fa4c88ca25f587f52074698d4ff7eb263de07930 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Mon, 4 Oct 2021 09:02:27 -0700 Subject: 49456: clean up detection of private params in nested scopes, update doc --- Test/V10private.ztst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Test') diff --git a/Test/V10private.ztst b/Test/V10private.ztst index 03e8259d5..56ffbc5b4 100644 --- a/Test/V10private.ztst +++ b/Test/V10private.ztst @@ -116,14 +116,14 @@ } outer () { local -PA hash_test=(in function) - typeset -p hash_test + private + hash_test inner } outer print ${(kv)hash_test} 0:private hides value from surrounding scope in nested scope >typeset -a hash_test=( top level ) ->typeset -A hash_test=( [in]=function ) +>hash_test=( [in]=function ) >typeset -g -a hash_test=( top level ) >array-local top level >top level @@ -246,7 +246,7 @@ F:note "typeset" rather than "private" in output from outer 1:privates are not visible in anonymous functions, part 3 >X top level >array_test not set -?(anon):4: array_test: attempt to assign private in nested scope +?(anon):4: array_test: can't change parameter attribute F:future revision will create a global with this assignment typeset -a array_test -- cgit 1.4.1