[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] packages/rudel/rudel-display.el:40:1:Error: eieio-oref called on

From: Mario Lang
Subject: [elpa] packages/rudel/rudel-display.el:40:1:Error: eieio-oref called on a class: rudel-backend-factory
Date: Sun, 10 Jul 2016 22:14:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)


Now that fsm.el has been fixed (thanks), the elpa elc build fails in the rudel

The problem seems to be in `eieio-oref' which looks a bit strange to me:

(defun eieio-oref (obj slot)
  "Return the value in OBJ at SLOT in the object vector."
  (declare (compiler-macro
            (lambda (exp)
              (ignore obj)
              (pcase slot
                ((and (or `',name (and name (pred keywordp)))
                      (guard (not (memq name eieio--known-slot-names))))
                  (format-message "Unknown slot `%S'" name) exp 'compile-only))
                (_ exp)))))
  (cl-check-type slot symbol)
  (cl-check-type obj (or eieio-object class))
  (let* ((class (cond ((symbolp obj)
                       (error "eieio-oref called on a class: %s" obj)
                       (let ((c (cl--find-class obj)))
                         (if (eieio--class-p c) (eieio-class-un-autoload obj))
                      (t (eieio--object-class obj))))
         (c (eieio--slot-name-index class slot)))

I have to admit that I don't grok eieio, but this piece of code looks
suspicious.  Wouldn't the code after the `error' call be dead?

On a somewhat related note, package rudel could use a port to cl-lib and
cl-generic.  Would that be a worthwhile change to make?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]