#265 DIRECT-SUPERCLASSES is not a slot of {a subclass of standard-class}

Unstable_git/CVS
open
nobody
None
1
2014-03-27
2013-07-21
Willem Broekema
No

I define that a metaclass, a class, and its instances, all should have a "dict" slot:

(in-package :cl-user)

(defclass dict-mixin ()
  ((dict :initarg :dict :initform nil :accessor dict)))

(defclass py-meta-type (dict-mixin standard-class)
  ())

(defclass py-type (dict-mixin standard-class)
  ()
  (:metaclass py-meta-type))

(defclass py-object (dict-mixin standard-object)
  ()
  (:metaclass py-type))

But then

ECL (Embeddable Common-Lisp) 13.5.1 (git:44c86e083c30ad9e057df1a91e8168600a99a2f6)

(load (compile-file "/tmp/test.lisp"))

fails with:

DIRECT-SUPERCLASSES is not a slot of #<a COMMON-LISP-USER::PY-TYPE>
  [Condition of type SIMPLE-ERROR]

Discussion


Anonymous


Cancel   Add attachments