diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-06-19 21:32:55 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-06-19 21:32:55 +0100 |
commit | 2dcd766f6292963256d3b1c585e7dc07b14512c1 (patch) | |
tree | e0a3c4797c66b2e2f990f2f388c4a91d8f38315a | |
parent | 879ef7e076289ff09d600dc3bb9c29ce441265db (diff) | |
download | zsh-2dcd766f6292963256d3b1c585e7dc07b14512c1.tar.gz zsh-2dcd766f6292963256d3b1c585e7dc07b14512c1.tar.xz zsh-2dcd766f6292963256d3b1c585e7dc07b14512c1.zip |
Fix bug with conflicting types for typeset array assignment.
This allows typeset -A hash=(key1 val1 key2 val2)
-rw-r--r-- | Src/builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index b34669f88..6cccf5330 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1998,7 +1998,7 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func), /* attempting a type conversion, or making a tied colonarray? */ tc = 0; - if (ASG_ARRAYP(asg)) + if (ASG_ARRAYP(asg) && PM_TYPE(on) == PM_SCALAR) on |= PM_ARRAY; if (usepm && ASG_ARRAYP(asg) && newspecial == NS_NONE && PM_TYPE(pm->node.flags) != PM_ARRAY && |