From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#40968: 28.0.50; (apply nil) Date: Wed, 6 May 2020 20:42:34 +0200 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29998"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40968@debbugs.gnu.org, Stefan Kangas To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 06 20:43:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWP0f-0007hi-OX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 20:43:09 +0200 Original-Received: from localhost ([::1]:56200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWP0e-0002qj-Nr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 14:43:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWP0Y-0002qG-DM for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 14:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWP0Y-0003k1-4U for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 14:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWP0Y-0000bU-1e for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 14:43:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 May 2020 18:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40968 X-GNU-PR-Package: emacs Original-Received: via spool by 40968-submit@debbugs.gnu.org id=B40968.15887905672300 (code B ref 40968); Wed, 06 May 2020 18:43:01 +0000 Original-Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:42:47 +0000 Original-Received: from localhost ([127.0.0.1]:41170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWP0J-0000b2-Jt for submit@debbugs.gnu.org; Wed, 06 May 2020 14:42:47 -0400 Original-Received: from mail83c50.megamailservers.eu ([91.136.10.93]:50850 helo=mail18c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWP0F-0000ao-QY for 40968@debbugs.gnu.org; Wed, 06 May 2020 14:42:46 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1588790558; bh=qiTwpwU1a5a+o0fN6Y5OIXqV4wmXsS4uJyf2kSa3XJ0=; h=From:Subject:Date:Cc:To:From; b=lbbWxbtKh6sRdLEF+NyhB8WpwxadpNq+mbM0LUC9kzJRVYooxHPOHb25ony0lZlmq btvzc+0wh55axmJZO5awbM8pI8LX2tZ4xQ2B3FfiB1IaZeDZlnHGEEZI3k1B01rAb0 Cd2BiAO6m+y5cmoCc7V7QnCM4aXiSbWDtxxo7bos= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail18c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 046IgZXk009332; Wed, 6 May 2020 18:42:36 +0000 X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F23.5EB304D5.0030, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=K8Zc4BeI c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=M51BFTxLslgA:10 a=FyimMvxhTKJVWkl6uL8A:9 a=CjuIK1q_8ugA:10 a=DnGgYRmb9dQCi2FSDzUA:9 a=De_Ol2h6w80A:10 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179837 Archived-At: --Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii That patch is fine but perhaps incomplete, if we want (apply nil) to = result in the same error when interpreted and byte-compiled. Suggested test case attached. The manual change is fine. Perhaps we should adopt a somewhat = discouraging tone. You could also say that (apply X) is defined as (apply (car X) (cdr X)), = and X must be a cons. --Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F Content-Disposition: attachment; filename=test.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="test.diff" Content-Transfer-Encoding: 7bit diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index bfe2d06a61..65fd57b4e0 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -352,7 +352,14 @@ byte-opt-testsuite-arith-data ;; `substring' bytecode generation (bug#39709). (substring "abcdef") (substring "abcdef" 2) - (substring "abcdef" 3 2)) + (substring "abcdef" 3 2) + + ;; `apply' with single argument (bug#40968). + (apply '(+ 2 3 5)) + (condition-case nil + (apply nil) + (wrong-type-argument 'wrong-arg)) + ) "List of expression for test. Each element will be executed by interpreter and with bytecompiled code, and their results compared.") --Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F--