diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-08-09 19:10:01 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-08-09 19:10:01 +0100 |
commit | 17d52d69ec696ee2cda77f1e6112d7d74a9e33a5 (patch) | |
tree | ae9044a7d97522de52c64aad569206bcd12cb980 /Src/builtin.c | |
parent | 249999cfb485914fe6f8630b1f4079e1227a5097 (diff) | |
download | zsh-17d52d69ec696ee2cda77f1e6112d7d74a9e33a5.tar.gz zsh-17d52d69ec696ee2cda77f1e6112d7d74a9e33a5.tar.xz zsh-17d52d69ec696ee2cda77f1e6112d7d74a9e33a5.zip |
Fix retying variables in opposite order.
Now gives an error. Add test.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 34bad035d..c63be7e81 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2674,7 +2674,9 @@ bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func) && (locallevel == pm->level || !(on & PM_LOCAL))) { if (pm->node.flags & PM_TIED) { unqueue_signals(); - if (!strcmp(asg->name, pm->ename)) { + if (PM_TYPE(pm->node.flags) != PM_SCALAR) { + zwarnnam(name, "already tied as non-scalar: %s", asg0.name); + } else if (!strcmp(asg->name, pm->ename)) { /* * Already tied in the fashion requested. */ |