From fa4c88ca25f587f52074698d4ff7eb263de07930 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Mon, 4 Oct 2021 09:02:27 -0700 Subject: 49456: clean up detection of private params in nested scopes, update doc --- Src/params.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Src/params.c') diff --git a/Src/params.c b/Src/params.c index 704aad588..b703a97ce 100644 --- a/Src/params.c +++ b/Src/params.c @@ -1013,6 +1013,11 @@ createparam(char *name, int flags) (oldpm->node.flags & PM_SPECIAL) || /* POSIXBUILTINS horror: we need to retain 'export' flags */ (isset(POSIXBUILTINS) && (oldpm->node.flags & PM_EXPORTED))) { + if (oldpm->node.flags & PM_RO_BY_DESIGN) { + zerr("%s: can't change parameter attribute", + name); + return NULL; + } oldpm->node.flags &= ~PM_UNSET; if ((oldpm->node.flags & PM_SPECIAL) && oldpm->ename) { Param altpm = -- cgit 1.4.1