emacs-devel
[Top][All Lists]
Advanced

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

Re: User-defined record types, v2


From: Lars Brinkhoff
Subject: Re: User-defined record types, v2
Date: Tue, 21 Mar 2017 10:55:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

There are three remaining failures in the test suite.  I'm looking into
them.

One of them is quite puzzling to me, and may require some EIEIO
insights.  In a fresh Emacs instance, define a class with a class
allocation slot:

    (require 'eieio)
    (defclass foo ()
      ((x :initarg :emu
          :initform emu
          :allocation :class
          :accessor get-foo)))

Now, this will fail:

    (progn (get-foo (foo)) (get-foo 'foo))

However, if you restart Emacs and define the class again, this will
work:

    (progn (get-foo 'foo) (get-foo (foo)))

As far as I can see, in the failing case, (get-foo 'foo) will enter the
method with the foo specializer.  In the other case it correctly enters
the method with the (subclass foo) specializer.




reply via email to

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