[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:pcl erroring out for some unknown reason
- To: commonloops.pa@Xerox.COM
- Subject: Re:pcl erroring out for some unknown reason
- From: Darrell <email@example.com>
- Date: Wed, 12 Jul 89 19:23:58 PDT
- Cc: Kai Lam <firstname.lastname@example.org>, David_McArthur <email@example.com>, Darrell_Shane <firstname.lastname@example.org>
- Redistributed: commonloops.pa
>> At random places where I am defining methods and classes I will get
>> an error message similar to the following:
>> Error: No matching method for the generic-function
>> #<Function CLASS-PRECEDENCE-LIST @ #x5a3519>,
>> when called with arguments (NIL).
>> After the error, PCL is completely corrupt. The error will be issued
>> from then on whenever an instance is instantiated, including classes
>> and methods. Has anyone experienced this error before? Any fixes,
>> or guidance will be most appreciated.
;;; I now know why this error message was issued. Consider the following:
(defclass c1 () ())
;;; Notice the incorrect lambda list.
(defmethod shared-initialize :after ((self c1) &rest ignore)
(declare (ignore slot-names ignore))
(format t "After c1 shared-initialize method.~%"))
(defmethod shared-initialize :before ((self c1) slot-names &rest ignore)
(declare (ignore ignore))
(format t "Before c1 shared-initialize method.~%"))
;;; When compiling the above class and two methods, PCL will issue the
;;; error message:
Error: No matching method for the generic-function #<Function
CLASS-PRECEDENCE-LIST @ #x59eda1>,
when called with arguments (NIL).
;;; when trying to compile the last method. That is an error is signaled
;;; when the next method of the generic function is compiled; not when the
;;; erroneous method is. The error message is extremely misleading
;;; especially when the two methods are separated by many other forms
;;; or are defined in separate files.
To all those who tried to help, thanks.