[Openmcl-devel] Custom Meta Classes
gb at clozure.com
Mon Jan 19 09:20:56 EST 2004
On Mon, 19 Jan 2004, Sven Van Caekenberghe wrote:
> We still have problems with this issue, specifically the following file
> can be compiled but cannot be loaded into 0.14-031220:
> (defpackage :foo (:use :cl))
> (in-package :foo)
> (defclass my-meta-class (standard-class)
> (defmethod validate-superclass ((class my-meta-class) (super
> (defclass foo ()
> (:metaclass my-meta-class))
> When I define the same code in cl-user it works...
The generic function #'VALIDATE-SUPERCLASS isn't part of ANSI CL.
It -is- part of the MOP.
The symbol VALIDATE-SUPERCLASS isn't accessible in the CL package.
It -is- exported from both the "CCL" and "OPENMCL-MOP" packages in
In the code fragment above, you're (inadvertently) defining a method
on #'FOO::VALIDATE-SUPERCLASSES. You could either:
a) define the package to use OPENMCL-MOP as well as CL
b) qualify the symbol:
(defmethod openmcl-mop:validate-superclass ...)
More information about the Openmcl-devel