Commit 215e5bf0 authored by Stefan Monnier's avatar Stefan Monnier

(eieio-copy-parents-into-subclass): Fix inheritance of initargs

Fixes: debbugs:20270

* lisp/emacs-lisp/eieio-core.el (eieio-copy-parents-into-subclass):
Fix inheritance of initargs.
parent a480a51f
......@@ -673,10 +673,9 @@ the new child class."
(let ((pslots (eieio--class-slots pcv))
(pinit (eieio--class-initarg-tuples pcv)))
(dotimes (i (length pslots))
(eieio--add-new-slot newc (cl--copy-slot-descriptor (aref pslots i))
(car-safe (car pinit)) nil nil sn)
;; Increment each value.
(setq pinit (cdr pinit))
(let* ((sd (cl--copy-slot-descriptor (aref pslots i)))
(init (car (rassq (cl--slot-descriptor-name sd) pinit))))
(eieio--add-new-slot newc sd init nil nil sn))
)) ;; while/let
;; Now duplicate all the class alloc slots.
(let ((pcslots (eieio--class-class-slots pcv)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment