CLOS+defstruct issues
Kenny Tilton <[email protected]>
| Newsgroups | gmane.lisp.corman |
|---|---|
| Message-ID | <[email protected]> |
Here is the source of talk.lisp, into which I pasted ACL results of each test after they were run: (in-package :cl-user) (defstruct aaa xxx) (defstruct (bbb (:include aaa)) yyy) (defstruct (ccc (:include bbb)) zzz) (defmethod talk :around ((it aaa)) (print (list it "talk around aaa")) (call-next-method)) (defmethod talk ((it aaa)) (print (list it "talk primary aaa"))) (defmethod talk ((it bbb)) (print (list it "talk primary bbb"))) (progn (talk (make-aaa)) (values)) ;;;(#S(AAA :XXX NIL) "talk around aaa") ;;;(#S(AAA :XXX NIL) "talk primary aaa") (progn (talk (make-bbb)) (values)) ;;;(#S(BBB :XXX NIL :YYY NIL) "talk around aaa") ;;;(#S(BBB :XXX NIL :YYY NIL) "talk primary bbb") (progn (talk (make-ccc)) (values)) ;;;(#S(CCC :XXX NIL :YYY NIL :ZZZ NIL) "talk around aaa") ;;;(#S(CCC :XXX NIL :YYY NIL :ZZZ NIL) "talk primary bbb") [end of talk.lisp] Here is what happens loading talk.lisp into CormanCL: (load "d:\\cells-030313\\cells\\talk.lisp") (#S( AAA :XXX NIL ) "talk around aaa") (#S( AAA :XXX NIL ) "talk primary aaa") (#S( BBB :XXX NIL :YYY NIL ) "talk primary bbb") ;;; An error occurred in function STD-COMPUTE-EFFECTIVE-METHOD-FUNCTION: ;;; Error: No primary methods for the generic function #<Standard-Generic-Function TALK #x17010C0>. That would be on the call-next-method. Now I went back in and changed all the talk methods to talk2 /except/ the around method (I am lazy and did not want to start a new session): In ACL: CELLO(34): (#S(AAA :XXX NIL) "talk primary aaa") CELLO(35): (#S(BBB :XXX NIL :YYY NIL) "talk primary bbb") CELLO(36): (#S(CCC :XXX NIL :YYY NIL :ZZZ NIL) "talk primary bbb") In CormanCL: (load "d:\\cells-030313\\cells\\talk.lisp") (#S( AAA :XXX NIL ) "talk primary aaa") (#S( BBB :XXX NIL :YYY NIL ) "talk primary bbb") ;;; An error occurred in function STD-COMPUTE-EFFECTIVE-METHOD-FUNCTION: ;;; Error: No primary methods for the generic function #<Standard-Generic-Function TALK2 #x1707AB8>. ;;; Returning to top level loop. I figured the above was on the CCC use, but to be sure I pulled the code out and executed it in the listener: (progn (talk2 (make-ccc)) (values)) ;;; An error occurred in function STD-COMPUTE-EFFECTIVE-METHOD-FUNCTION: ;;; Error: No primary methods for the generic function #<Standard-Generic-Function TALK2 #x1707AB8>. -- kenny tilton clinisys, inc http://www.tilton-technology.com/ --------------------------------------------------------------- "Cells let us walk, talk, think, make love and realize the bath water is cold." -- Lorraine Lee Cudmore ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/SyjtlB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/