Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!parc.xerox.com!Gregor From: Gregor@parc.xerox.com (Gregor Kiczales) Newsgroups: comp.lang.clos Subject: Re: Bug in May Day PCL (REV 4) Message-ID: <91Feb8.103019pst.3664@anchor.parc.xerox.com> Date: 8 Feb 91 18:30:12 GMT References: <7533@ifi.informatik.uni-stuttgart.de> Sender: welch@tut.cis.ohio-state.edu Distribution: inet Organization: CommonLoops Lines: 23 Date: Thu, 7 Feb 1991 23:42:46 PST From: hohl%ifistg.uucp@ira.uka.de (Hubertus Hohl) Slot access in the new Revision 4 PCL [May Day PCL (REV 4)] does not always work correctly. Consider the following code fragment (extracted from a more complex piece of code): (defmethod m1 ((maybe-a-thing t)) (if (typep maybe-a-thing 'thing) (slot-value maybe-a-thing 't-1) maybe-a-thing)) (m1 (make-instance 'thing)) => 999 (m1 'foo) => Error: No matching method for the generic-function #, when called with arguments (# T-1). The bug here isn't with slot access, its with TYPEP. PCL doesn't redefine typep to know about CLOS classes. You need to use the special version of TYPEP provided by PCL.