#276: defmethod doesn't call add-method -----------------------+---------------------------------------------------- Reporter: rschlatte | Owner: rschlatte Type: defect | Status: new Priority: major | Milestone: Component: (A)MOP | Version: Keywords: | -----------------------+---------------------------------------------------- Reported by Pascal Costanza:
There is a problem that a defmethod may not call add-method as it should. Here is a transcript: {{{ CL-USER(1): (use-package :mop) T CL-USER(2): (defclass my-generic-function (standard-generic-function) () (:metaclass funcallable-standard-class)) #<FUNCALLABLE-STANDARD-CLASS MY-GENERIC-FUNCTION {3606AFA2}> CL-USER(3): (defgeneric f (x) (:generic-function-class my-generic- function)) #<MY-GENERIC-FUNCTION F {589D4D84}> CL-USER(4): (defmethod add-method :after ((gf my-generic-function) (m standard-method)) (print :foo)) #<STANDARD-METHOD ADD-METHOD :AFTER (MY-GENERIC-FUNCTION STANDARD-METHOD) {3F4C428F}> CL-USER(5): (defmethod f ((x integer)) (+ x x)) #<STANDARD-METHOD F (INTEGER) {27A5DAC0}> CL-USER(6): (add-method #'f *)
:FOO #<MY-GENERIC-FUNCTION F {589D4D84}> CL-USER(7): (f 5) 10 }}} …or maybe just :after methods on add-method are not called…
#276: defmethod doesn't call add-method -----------------------+---------------------------------------------------- Reporter: rschlatte | Owner: rschlatte Type: defect | Status: new Priority: blocker | Milestone: 1.1.0 Component: (A)MOP | Version: Keywords: | -----------------------+---------------------------------------------------- Changes (by mevenson):
* priority: major => blocker * milestone: => 1.1.0
#276: defmethod doesn't call add-method ------------------------+--------------------------------------------------- Reporter: rschlatte | Owner: rschlatte Type: defect | Status: closed Priority: blocker | Milestone: 1.1.0 Component: (A)MOP | Version: Resolution: fixed | Keywords: ------------------------+--------------------------------------------------- Changes (by rschlatte):
* status: new => closed * resolution: => fixed
Comment:
(In [14289]) Don't shortcut add-method for subclasses of standard-generic- function
- Fixes #276
- Reported by Pascal Costanza
#276: defmethod doesn't call add-method ------------------------+--------------------------------------------------- Reporter: rschlatte | Owner: rschlatte Type: defect | Status: closed Priority: blocker | Milestone: 1.1.0 Component: (A)MOP | Version: Resolution: fixed | Keywords: ------------------------+---------------------------------------------------
Comment(by mevenson):
(In [14290]) abcl-1.1.x: Backport r14289.
Don't shortcut add-method for subclasses of standard-generic-function
- Fixes #276
- Reported by Pascal Costanza
armedbear-ticket@common-lisp.net