GNU bug report logs - #37283
27.0.50; Struct defined by cl-defstruct with :noinline failed to set slot using setf

Previous Next

Package: emacs;

Reported by: Zhu Zihao <all_but_last <at> 163.com>

Date: Mon, 2 Sep 2019 15:28:02 UTC

Severity: normal

Found in version 27.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Zhu Zihao <all_but_last <at> 163.com>
Subject: bug#37283: closed (Re: bug#37283: 27.0.50; Struct defined by
 cl-defstruct with :noinline failed to set slot using setf)
Date: Mon, 09 Sep 2019 21:35:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#37283: 27.0.50; Struct defined by cl-defstruct with :noinline failed to set slot using setf

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 37283 <at> debbugs.gnu.org.

-- 
37283: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37283
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 37283-done <at> debbugs.gnu.org
Subject: Re: bug#37283: 27.0.50; Struct defined by cl-defstruct with
 :noinline failed to set slot using setf
Date: Mon, 09 Sep 2019 17:34:38 -0400
> Yes, this snippet work as expected now. Thanks for your work.


[Message part 3 (message/rfc822, inline)]
From: Zhu Zihao <all_but_last <at> 163.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50;
 Struct defined by cl-defstruct with :noinline failed to set slot
 using setf
Date: Mon, 02 Sep 2019 21:09:31 +0800
Start Emacs with "emacs -Q" and run following code

(require 'cl-lib)
(cl-defstruct (stt (:noinline t))
  slt-a slt-b)

(let ((inst (make-stt :slt-a 1 :slt-b 2)))
  (setf (stt-slt-a inst) 2))

Will get error "Symbol’s function definition is void: \(setf\ stt-slt-a\)"

It seems that the accessors of struct defined with :noinline can't be expand
with "setf" directly.

This issue probably introduced at commit 144b2243b7cee4adbc3217d871c575921f95af54.




This bug report was last modified 5 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.