In the following code i see very different behavior from CMUCL
and CLISP. Can someone tell me which is the correct behavior?
In CMUCL, I see both the primary method being called and also
the after method. However, from CLISP only the primary method
seems to be called.
thanks
-jim
(defpackage "FOO"
(:use "COMMON-LISP")
(:export "FUN"
"MIXIN-FOO"))
(in-package foo)
(defclass mixin-foo nil nil)
(defclass class-foo (mixin-foo) nil)
(defgeneric fun (x))
(defmethod fun ((x class-foo))
(fresh-line)
(format t "hello from fun~%")
(finish-output))
(defpackage "BAR"
(:use "FOO"
"COMMON-LISP"))
(in-package bar)
(defclass class-bar nil nil)
(defmethod fun :after ((x class-bar))
(fresh-line)
(format t "hello from after fun~%")
(finish-output))
;; redefine class class-foo
(defclass mixin-foo (class-bar)
nil)
(in-package foo)
(fun (make-instance 'class-foo))
--
+------------------------------------------------------------------+
| [EMAIL PROTECTED] __ http://agora.rdrop.com/~jimka |
+----------------------------\/------------------------------------+
| Prejudice always masquerades as rationality until it is exposed. |
+------------------------------------------------------------------+
| None of us is truly free until all of us are free, with all our |
| rights intact and guaranteed, including the basic right to live |
| without threat or harassment. [PLAGAL] |
+------------------------------------------------------------------+