about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2020-12-27 14:36:35 -0800
committerBart Schaefer <schaefer@ipost.com>2021-04-13 21:18:35 -0700
commitf621fb7ab8ba9a7d4992a45b4b1033e7ef897154 (patch)
tree5cae7720ba5e9d659776a3bc03da8f4f4db052d2 /Src
parentdcd4439a9f3a2212d753ece6ef644aed2ec4d333 (diff)
downloadzsh-f621fb7ab8ba9a7d4992a45b4b1033e7ef897154.tar.gz
zsh-f621fb7ab8ba9a7d4992a45b4b1033e7ef897154.tar.xz
zsh-f621fb7ab8ba9a7d4992a45b4b1033e7ef897154.zip
Fix ${(t)var} output, add comparative test cases
Diffstat (limited to 'Src')
-rw-r--r--Src/subst.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 96e0914eb..9928be0e9 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2563,7 +2563,8 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
 	     * Handle the (t) flag: value now becomes the type
 	     * information for the parameter.
 	     */
-	    if (v && v->pm && !(v->pm->node.flags & PM_UNSET)) {
+	    if (v && v->pm && ((v->pm->node.flags & PM_DECLARED) ||
+			       !(v->pm->node.flags & PM_UNSET))) {
 		int f = v->pm->node.flags;
 
 		switch (PM_TYPE(f)) {