From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12366 invoked by alias); 22 Nov 2015 19:23:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37197 Received: (qmail 5835 invoked from network); 22 Nov 2015 19:23:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [86.6.158.222] X-Spam: 0 X-Authority: v=2.1 cv=TNS4MARa c=1 sm=1 tr=0 a=2SBOh4l1h08DI0L+aujZyQ==:117 a=2SBOh4l1h08DI0L+aujZyQ==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=qtqOOiqGOCEA:10 a=xjHa6eD13-VxpatTbOUA:9 a=CjuIK1q_8ugA:10 Message-Id: <201511221915.tAMJFbFW006908@localhost.localdomain> X-Authentication-Warning: localhost.localdomain: pws owned process doing -bs From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Possibly excessive WARN_CREATE_GLOBAL In-Reply-To: Message from Bart Schaefer of "Sun, 22 Nov 2015 11:04:06 -0800." <151122110406.ZM10741@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6906.1448219737.1@localhost.localdomain> Date: Sun, 22 Nov 2015 19:15:37 +0000 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