From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1500 invoked from network); 26 Jul 2001 11:38:30 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jul 2001 11:38:30 -0000 Received: (qmail 17541 invoked by alias); 26 Jul 2001 11:38:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15501 Received: (qmail 17530 invoked from network); 26 Jul 2001 11:38:21 -0000 Sender: kiddleo Message-ID: <3B60012C.EF6E906A@u.genie.co.uk> Date: Thu, 26 Jul 2001 12:38:20 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Zsh hackers list Subject: Re: Nasty bug in array-element typeset assignments References: <002001c115c3$524f76b0$21c9ca95@mow.siemens.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Borsenkow Andrej wrote: > > Commit log does not have article number, but diffs are here: Going by the commit date, I can't find an associated message in the archives. > > Really? So what would it do? Make the whole foo array local or just the > > first element? Clearly neither works. > > Probably, intent was to create new local array. Urgh. Is that really that useful? I think it'd be better to save the extra mess in the code and disallow it with roughly what you get by adding this: } else if (on & PM_LOCAL && locallevel) { zerrnam(cname, "%s, can't create local array elements", pname, 0); return NULL; after the similar bit for readonly inside the strchr(pname, '[') test in typeset_single. Also, if this is fixed to make the whole array local but the fix is complicated then this small change might be a good option for the 4.0 branch. Incidentally, I get a couple of test failures with the latest CVS - on with _arguments and the other for posixbuiltins. Oliver