From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30809 invoked from network); 27 Dec 2020 23:05:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Dec 2020 23:05:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1609110322; b=xMNjUeRvLKBtWp53lAF8NA+szgG7NcsbgJ6txq2Vg77Rt7WGXxts/ZyFpbkcBHDTl5OwCxkwak sWAkBYMYr6BIW4umkBA2N23yUBzci5y/0Fn7SMKD41QwPPsR19mLnMa5KlANAdrT3o+8M4g7IN XOiDdlaNZjiX52HLfnC9vlRlifl99oHGMcKME8JAdzIig+NebXI5u9oxGxEhUhxrFrCV++GmNk dfgd8nBZ1fTibtbfBZmNguf6L/cVeR9sCZtoyQUZNjsi9wTlbnaEZjWUH9xmaTAJJN5tR9Ai8Z Zc9vU9TQcAAk32ydyy95C/FO+IBGgZVfcZRALb2fMABx4w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f53.google.com) smtp.remote-ip=209.85.210.53; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1609110322; bh=7D+B+tYGjF1QtxwGpUi1CD2l0Yluw5mjjYOecWt9oiM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=stwpgTPu+V4jlzEP2wk2JY1Rx3lo3myDJDKY4p6+UMBwtyxfU6/sqVRS7LIMmpz7D8YyV9hGZG 4G+noGkG/7enPrZdZ2raGZbUtvunojJzuHEy2NoCJIqnk9amaUxZJL6udSTigMAt5gBiNUPIwc az+TySr0uS2ZMXmGCeG4DDEVG2ISUFJ/KHAmVGJ6GsqVe2At8g0wGfJHjrJhOAlXKAziyREh0/ pkiCLYhXtsrg6GtRbUB37N0f0illX2f/XzVxXgxjSe/ytwis5p19xA3XuI67ohGqIsAYKuIuCs piKBUQBc7Td3MmxRz2gd7cuW7rGLuBnn0/O8gFAzYvcz4Q==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=0SRErqvtuaboQZv9hFJM6PBF2p3tV+X14+7E9kmj6CQ=; b=D5CzfUBGdq7i5SPVcsdQkoMrS4 twkn1f5tVz8wTk6R676/tYZnOqPxadrxH8R88NjlVTXMgm+aivQ9gPE70b70Quf06nUQbJSXsBFmq jfSLL9b7kXlDEqRBbUJadeSv9Q/PgBzzi5QyjVX1oCFVPwUGi0DRvmesIOY4QN21ok/wmTBU7+jV7 L3CprEFj9NDC6WMFypp2BLmuw0lojtSYwe41suRspIOR7FpFmr0dRBjxnrvr7DmGVkpGCRIoUj/fi eB/INv9yiRqaEyKZL1rI1xjiLXip2Fa7zr9SqZdDx7Y5tPFdraCD0D7TOxJOjpjlSw4ky9Eghh/mh bMsBViHw==; Received: from authenticated user by zero.zsh.org with local id 1ktf6H-000DgA-UY; Sun, 27 Dec 2020 23:05:21 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f53.google.com) smtp.remote-ip=209.85.210.53; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f53.google.com ([209.85.210.53]:41988) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ktf61-000DWd-GP; Sun, 27 Dec 2020 23:05:07 +0000 Received: by mail-ot1-f53.google.com with SMTP id 11so7848623oty.9 for ; Sun, 27 Dec 2020 15:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0SRErqvtuaboQZv9hFJM6PBF2p3tV+X14+7E9kmj6CQ=; b=BddM+AjZByjjsBv1r8C959EqFvREnKHxCahiMZJEbVGjq2hic8FtELx/XwsFme6RPX N0LK4ndF3XcGfcypaF+zw1gUnRh/kdb8tfQeFvXJP82h5bK5JKYycSQYRY/tjg6Q4KfS gg3AnKHJvBHE97w428XG6XDvwFZUlqOSsBX4VO53cavCI1cXwxc1zNXIE2Ythiv/Y6oP ZwC0bT4Mom0w+0EgrTxU9CkTG0TduE/VAagQPPHIHp9Ps0bWWHo35zuIObCDBpCywslK OWid72ZLos1XOjRKC55EbZoCXgeSLhNlPSLVdEb37xdqzF79E1Qiq+J8+LSdm5l+BSmS JyHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0SRErqvtuaboQZv9hFJM6PBF2p3tV+X14+7E9kmj6CQ=; b=c8lKovqcSWhAruWwjN66/EKnRTWhRz/88N3LzXk5UZ8Oy49iUDFA+38+JUs2DZZRYb sLta+OL31Gmw/3rFYX71aqs2yVq5i72A0DD7AziLV55KxFgpWPXcKPNoGnPaXHqrww19 +gk3xphHeLU5z4phl0bN7x6PF+G4zu3i5vQQJGh4JlzHn9mPnghVNgeSuS8VavSRramH Zq4nKnmlJztvJWYqohyGA5vtHJty4bTC8YcR5HUU3Xv9JGeZF4AuN0FVCOU5bQg8F4w1 OFa0D/vCO2R5luhogY/YVPN4esfhpChaq7gO7QWR6RbudMN+G9WKcnnWYUma4GL/FgDl UKEQ== X-Gm-Message-State: AOAM532FkfZOWdTDUgbg0Yr47PN88AhIg6BKFz0Z4QBmTcvjA6uWXrI8 6WWumO9q5/IclwE0caovLLEYHw0GRNdbyiy9g/oqUs1SckwjZ6PX X-Google-Smtp-Source: ABdhPJw24XW09QpPklenQTMHPGvafuf05VZXWDI0Je97PAiRyrYf/tv7iRJDIzbqITORuII/yf96i68AQeYTTOvDw5c= X-Received: by 2002:a9d:208a:: with SMTP id x10mr30875778ota.260.1609110304181; Sun, 27 Dec 2020 15:05:04 -0800 (PST) MIME-Version: 1.0 References: <20201223234711.492603-1-felipe.contreras@gmail.com> In-Reply-To: <20201223234711.492603-1-felipe.contreras@gmail.com> From: Bart Schaefer Date: Sun, 27 Dec 2020 15:04:53 -0800 Message-ID: Subject: Another push on declarednull branch To: "zsh-workers@zsh.org" Cc: Felipe Contreras Content-Type: text/plain; charset="UTF-8" X-Seq: 47764 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Wed, Dec 23, 2020 at 3:47 PM Felipe Contreras wrote: > > In my branch it's actually called PM_NULL because I think semantically > makes more sense. Note I'm not rejecting your diff, just fixing things I overlooked in my own. I OR'd PM_UNSET into PM_DECLAREDNULL because I thought there would be fewer (and/or less confusing) cases where PM_UNSET had to be ignored than cases where both PM_UNSET and (new flag) had to be treated as equivalent, but having found all (hopefully) of the former it's probably a wash. Maybe you can still generate a simpler patch. Alternate names for PM_DECLARED would be welcome. If I could turn back time, I might use PM_NOTSET, and then PM_NULL == (PM_NOTSET|PM_UNSET). In fact I already like that enough better that I'd probably redo it that way before submitting a patch for master. > I added a test that shows a discrepancy I found (${(t)var}) New push to declarednull branch (tip is now 20e4d07b0) fixes this. Also added the test from Filipe's patch and another test for readonly declarations. Note that workers/47704 (POSIX "readonly -p") hasn't been committed/pushed anywhere yet, and I don't think we discussed whether that should do something to "typeset" in ksh emulation. It may be several days before I can look at this again.