diff options
author | Bart Schaefer <schaefer@ipost.com> | 2021-10-04 09:02:27 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@ipost.com> | 2021-10-04 09:02:27 -0700 |
commit | fa4c88ca25f587f52074698d4ff7eb263de07930 (patch) | |
tree | 24b6b556dd3900fc6253b51603850058efc50ab1 /Test | |
parent | 99d915330aa470e5ca723084f54910d82aec444d (diff) | |
download | zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar.gz zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar.xz zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.zip |
49456: clean up detection of private params in nested scopes, update doc
Diffstat (limited to 'Test')
-rw-r--r-- | Test/V10private.ztst | 6 |
1 files changed, 3 insertions, 3 deletions
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 |