mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Call eieio--class-* accessors only on eieio classes (bug#78786)
* lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default): (eieio-oset, eieio-oset-default): Don't look for class slots except in eieio classes. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-defstruct-slot-value): New test.
This commit is contained in:
parent
a76506f131
commit
6a5d9cb07d
2 changed files with 13 additions and 7 deletions
|
|
@ -1047,7 +1047,9 @@ Subclasses to override slot attributes."))
|
|||
(slot-value x 'c)))
|
||||
(setf (slot-value x 'a) 1)
|
||||
(should (eq (eieio-test--struct-a x) 1))
|
||||
(should-error (setf (slot-value x 'c) 3) :type 'eieio-read-only)))
|
||||
(should-error (setf (slot-value x 'c) 3) :type 'eieio-read-only)
|
||||
(with-no-warnings
|
||||
(should-error (eieio-oref x 'd)) :type 'invalid-slot-name)))
|
||||
|
||||
(defclass foo-bug-66938 (eieio-instance-inheritor)
|
||||
((x :initarg :x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue