mirror of
https://github.com/zsh-users/zsh
synced 2024-09-20 08:22:05 +00:00
disallow changing of parameter type
for autoloadable parameter (bug 219459 on Sourceforge).
This commit is contained in:
parent
32f8d43b61
commit
3278ad8490
|
@ -1,3 +1,8 @@
|
|||
2001-03-29 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 13837: Src/builtin.c: disallows changing of parameter type
|
||||
for autoloadable parameter (bug 219459 on Sourceforge).
|
||||
|
||||
2001-03-29 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 13833: Completion/Core/_expand: fix comparison of expansions
|
||||
|
|
|
@ -1628,10 +1628,16 @@ typeset_single(char *cname, char *pname, Param pm, int func,
|
|||
if ((tc = chflags && chflags != (PM_EFLOAT|PM_FFLOAT)))
|
||||
usepm = 0;
|
||||
}
|
||||
if (tc && (pm->flags & PM_SPECIAL)) {
|
||||
zerrnam(cname, "%s: can't change type of a special parameter",
|
||||
pname, 0);
|
||||
return NULL;
|
||||
if (tc){
|
||||
if (pm->flags & PM_SPECIAL) {
|
||||
zerrnam(cname, "%s: can't change type of a special parameter",
|
||||
pname, 0);
|
||||
return NULL;
|
||||
} else if (pm->flags & PM_AUTOLOAD) {
|
||||
zerrnam(cname, "%s: can't change type of autoloaded parameter",
|
||||
pname, 0);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue