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-10 14:12:29 -0700
commitd649bf78dc3096d6ca0c705257a928b1acce3b82 (patch)
tree948d620a97dd7130e40cb6067d0063ff664499ca /Src
parent2eb9289d1277bf71b1b9dea2addbddd36b61f276 (diff)
downloadzsh-d649bf78dc3096d6ca0c705257a928b1acce3b82.tar.gz
zsh-d649bf78dc3096d6ca0c705257a928b1acce3b82.tar.xz
zsh-d649bf78dc3096d6ca0c705257a928b1acce3b82.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)) {