[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in pcl::slot-exists-p
- To: commonloops.pa@Xerox.COM
- Subject: bug in pcl::slot-exists-p
- From: alarson@src.honeywell.com (Aaron Larson)
- Date: Tue, 26 Jul 88 13:38:03 CDT
- Posted-date: Tue, 26 Jul 88 13:38:03 CDT
- Redistributed: commonloops.pa
pcl-system-date = "3/17/88 St. Patrick's Day PCL"
lisp implementation = Franz Inc. Extended Common Lisp 2.0 (9/8/87 8:24)
(pcl::slot-exists-p obj 'slot-name) returns true for all slot names.
Probable cause is the following from slots.lisp:
(defun slot-value-using-class--class-internal (class object slot-name
dont-call-slot-missing-p
default)
(with-slot-internal--class (class object slot-name nil)
(:instance (index) (get-static-slot--class object index))
(:dynamic (loc newp) (if (eq newp t) (setf (car loc) default) (car loc)))
(:class (slotd) (slotd-initform slotd))
(nil () (unless dont-call-slot-missing-p
(slot-missing object slot-name)))))
Should be something like:
(nil () (if dont-call-slot-missing-p
(return-from slot-value-using-class--class-internal default)
(slot-missing object slot-name)))))
For some reason just giving the default rather than using a return-from did
not work. Since I noticed this in a non exported function, I didn't spend
much time tracking down why. The definition of the function is unchanged
in the latest release as well.