I have the following methods
(defmethod foo (arg))
(defmethod foo ((arg integer)))
(defmethod foo ((what (eql :bar))))
Now I want to use find-method:
USER(55): (find-method #'foo '() (list (find-class t)))
#<STANDARD-METHOD FOO (T)>
USER(56): (find-method #'foo '() (list (find-class 'integer)))
#<STANDARD-METHOD FOO (INTEGER)>
USER(57):
But what to use for the eql specialized method. According to the
Hyperspec the parameter specializer can be a class-object, a symbol or a
list of (eql <object>)
but I get the following error:
USER(58): (find-method #'foo '() `( (eql :bla)))
Error: The generic function #<STANDARD-GENERIC-FUNCTION FOO> does not
have a method
with qualifiers NIL specializers ((EQL :BLA))
[condition type: PROGRAM-ERROR]
[1] USER(59):
What is the right thing to do here?
--
Stefan Landvogt - <nichimen.com at stefan>