local, rename: don't allow renaming a local proc with upcall
commitf35906bf66173de97f1f0febab9c996a273e260b
authorSteve Bennett <steveb@workware.net.au>
Fri, 17 Apr 2020 04:39:19 +0000 (17 14:39 +1000)
committerSteve Bennett <steveb@workware.net.au>
Fri, 17 Apr 2020 07:36:50 +0000 (17 17:36 +1000)
treece79d61e11b98cb699e4f21ca7152435c80b8480
parent30f1b1ce7a3755db94c31c77f6e013d84ab36a55
local, rename: don't allow renaming a local proc with upcall

If an existing command was replaced when using local proc ...,
then renaming the command will break upcall from within the proc
because the command no longer exists in the namespace. To prevent
this case, disallow rename of such a command.

It is still OK to delete with rename <cmd> ""

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c
tests/alias.test