diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/params.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Src/params.c b/Src/params.c index 263cd0c52..4bcf41c22 100644 --- a/Src/params.c +++ b/Src/params.c @@ -1050,8 +1050,14 @@ createparam(char *name, int flags) name = refname; oldpm = NULL; } else { - if (!(lastpm->node.flags & PM_READONLY)) - lastpm->node.flags |= PM_UNSET; + if (!(lastpm->node.flags & PM_READONLY)) { + if (flags) { + /* Only plain scalar assignment allowed */ + zerr("%s: can't change type of named reference", + name); /* Differs from ksh93u+ */ + return NULL; + } + } return lastpm; } } else { |