Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Possibly excessive WARN_CREATE_GLOBAL

On Nov 22,  7:15pm, Peter Stephenson wrote:
} Or do you mean it doesn't actually get set *at all*?  That should surely
} trigger an error immediately in the inner scope, shouldn't it?

It doesn't get set at all.

We come into createparam() and discover at line 878 that the parameter
already exists, which is what we want, but in spite of it being flagged
PM_SPECIAL|PM_REMOVABLE all createparam() does is toggle off the PM_UNSET
flag, which seems dubious.

(And *then* it tests PM_RESTRICTED, which it seems to me ought to come
first?  That's not related to this thread, but I wouldn't think you
should be able to change the unset-ness of a restricted parameter.)

Then we enter fetchvalue() at line 2926, which correctly returns that the
parameter does not have a value, and assignaparam() silently surrenders at
line 2929.  Maybe there should always be an error at that point, I don't
know how else we might get there.

Messages sorted by: Reverse Date, Date, Thread, Author