Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possibly excessive WARN_CREATE_GLOBAL
- X-seq: zsh-workers 37197
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Possibly excessive WARN_CREATE_GLOBAL
- Date: Sun, 22 Nov 2015 19:15:37 +0000
- In-reply-to: Message from Bart Schaefer <schaefer@brasslantern.com> of "Sun, 22 Nov 2015 11:04:06 -0800." <151122110406.ZM10741@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Bart Schaefer wrote:
> No time to fix it now, but declaring something "private" suppresses the
> warncreateglobal warning without allowing the variable to become set in
> the inner scope. (What SHOULD happen here? An error?)
Do you mean, it gets created in the inner scope as if it were global but
gets wiped out in the higher scope? That would be functionally OK in
the particular case but dodgy as far as the definition of the inner
function is concerned. It might be more weight for an extended warning
"created without localisation in some inner scope even though it doesn't
actually propagate back to the top level", except shorter.
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?
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author