summaryrefslogtreecommitdiffstats
path: root/Test/V10private.ztst
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-10-04 09:02:27 -0700
committerBart Schaefer <schaefer@ipost.com>2021-10-04 09:02:27 -0700
commitfa4c88ca25f587f52074698d4ff7eb263de07930 (patch)
tree24b6b556dd3900fc6253b51603850058efc50ab1 /Test/V10private.ztst
parent49440: Make double-flag parameter expansion syntax more discoverable in docs (diff)
downloadzsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar
zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar.gz
zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar.bz2
zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar.lz
zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar.xz
zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.tar.zst
zsh-fa4c88ca25f587f52074698d4ff7eb263de07930.zip
49456: clean up detection of private params in nested scopes, update doc
Diffstat (limited to 'Test/V10private.ztst')
-rw-r--r--Test/V10private.ztst6
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