From 2dcd766f6292963256d3b1c585e7dc07b14512c1 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 19 Jun 2015 21:32:55 +0100 Subject: Fix bug with conflicting types for typeset array assignment. This allows typeset -A hash=(key1 val1 key2 val2) --- Src/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 && -- cgit 1.4.1