From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51068: 28.0.50; eieio defclass regression in emacs 28 Date: Mon, 12 Sep 2022 13:02:03 +0200 Message-ID: <87wna897pw.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11135"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Monnier , 51068@debbugs.gnu.org To: dalanicolai Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 12 13:04:36 2022 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 1oXhEx-0002bH-Ql for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 13:04:35 +0200 Original-Received: from localhost ([::1]:43284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXhEw-0004OU-Jl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 07:04:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXhDU-0004Hz-FI for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 07:03:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXhDS-0005El-LW for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 07:03:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXhDS-0004Rf-B5 for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2022 07:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2022 11:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51068 X-GNU-PR-Package: emacs Original-Received: via spool by 51068-submit@debbugs.gnu.org id=B51068.166298053617019 (code B ref 51068); Mon, 12 Sep 2022 11:03:02 +0000 Original-Received: (at 51068) by debbugs.gnu.org; 12 Sep 2022 11:02:16 +0000 Original-Received: from localhost ([127.0.0.1]:44273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXhCi-0004QR-6D for submit@debbugs.gnu.org; Mon, 12 Sep 2022 07:02:16 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:51236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXhCg-0004QD-7B for 51068@debbugs.gnu.org; Mon, 12 Sep 2022 07:02:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zKb08B+Lwqz/ZPlprYPcfZ0T9tSBBj3AFG8w41WW4xk=; b=g8VcJhEQWYaZ6WeCkC5EDn4fIq iwustepxV3jsJTt4bjHVmWo7Gvdp/I74TFpsRF2FtEteD+W6COAYIubcCWbpwzrhfCCECtwsmWBgR EzdcMI1G4DT27+3olvTifWl6OOBOXMFmgT2F3jUQeaPEqM+5lNYMTfh/W3QBtcspVp0w=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXhCW-0005Rh-GX; Mon, 12 Sep 2022 13:02:06 +0200 In-Reply-To: (dalanicolai@gmail.com's message of "Thu, 7 Oct 2021 08:31:42 +0200") X-Now-Playing: Django Django's _Django Django (Remaster)_: "Default" 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:242231 Archived-At: dalanicolai writes: > Starting from emacs -Q, in Emacs 27 when I try to evaluate the following code: > > (require 'eieio) > > (defclass rectangle () > (height width)) > > different than in CLOS, Emacs errors with: > '(wrong-type-argument listp height)' > > When I evaluate the same code in Emacs 28 then Emacs does not return an > error. > > However, if I subsequently try to initialize the slots using: > > (let ((r (make-instance rectangle))) > (setf (slot-value r 'height) 2 > (slot-value r 'width) 3)) > > then Emacs 28 does return an error. If I replace the code to create the > class with (adding the parentheses around the slots): > > (defclass rectangle () > ((height) (width))) > > then the code above for initializing the slots works as expected (and similar behavior > when using oref). Which means that also in Emacs 28 the parentheses are required. > So Emacs 27 correctly errors when not using them, but Emacs 28 suggests that > things are alright when omitting the parentheses which is incorrect and confusing. > > Then additionally, the requirement of the parentheses is, as far as I > could find, not explicitly mentioned as a 'difference from CLOS' in the manual, which > 'additionlly' is confusing. (I'm going through old bug reports that unfortunately weren't resolved at the time.) This is still the case in Emacs 29. Erroring out earlier (like Emacs 27) sounds like a good idea, and so is documenting this. Perhaps Stefan has some comments; added to the CCs.