[Bug-openmcl] (typep (make-foo) 'structure) -> signals an error

Gary Byers gb at clozure.com
Sun Jan 18 10:33:13 MST 2004



On Sun, 18 Jan 2004, Bruce D. Nilo wrote:

> In pre 12/20 .14 releases the above would work - assuming a previous
> (defstruct foo...)
>
> In the 12/20 release (typep (make-foo) 'structure-object) works but not
> the other.
>
> I am not certain if 'structure is suppose to be in the type hierarchy
> or not by the standard, although I do know that it tends to work in
> other implementations.
>
> Bruce
>

The symbol CL:STRUCTURE isn't a defined type or class name, so TYPEP
shouldn't have been recognizing it as such.  (The symbol CL:STRUCTURE
is in the CL package only because it's used as a specializer on some
DOCUMENTATION/(SETF DOCUMENTATION) methods.)  Things made with DEFSTRUCT
are instances of STRUCTURE-OBJECT, and TYPEP and related functions should
recognize that.

I tried to get rid of all cases where STRUCTURE was being used as a
type specifier, but missed at least one: the function CL:COPY-STRUCTURE
was still checking that its arg was of type STRUCTURE.

This should have been noted (as a bug fix) in the release notes.



More information about the Bug-openmcl mailing list