DEFGENERIC with unsuitable :generic-function-class gives incomprehensible error
Compiling and loading the following (incorrect) file gives an error saying that foo-generic-function is not of type standard-generic-function. The real error is that foo-generic-function must be defined with (:metaclass funcallable-standard-class) to be suitable as a generic function class.
(require :clos)
(defclass foo-generic-function (standard-generic-function))
(defgeneric goo (a b)
(:generic-function-class foo-generic-function)
(:method (a b)
(princ "default method")))
(print #'goo)
The attached patch would emit a full warning in defgeneric, but currently find-class does not implement correct behavior when called with 3 parameters.
Change History (21)
Component: |
(A)MOP →
CLOS
|
Owner: |
changed from ehuelsmann to somebody
|
Milestone: |
→ 1.2.0
|
Version: |
→ 1.2.0-dev
|
Owner: |
changed from somebody to rschlatte
|
Status: |
new →
assigned
|
Summary: |
defgeneric with unsuitable :generic-function-class gives incomprehensible error →
DEFGENERIC with unsuitable :generic-function-class gives incomprehensible error
|
defgeneric generic-function-class warning patch