|
RE: Re: CLOS+defstruct issues: msg#00070lisp.corman
I added two files to the patches directory: http://www.cormanlisp.com/CormanLisp/patches/2_01/ which fix this problem with :include in DEFSTRUCT. Honestly, I was never aware of this feature, so didn't implement it, although it makes perfect sense. Thanks for tracking down the problem. Roger -----Original Message----- From: news [mailto:news@xxxxxxxxxxxxxx] On Behalf Of Frode Vatvedt Fjeld Sent: Friday, March 14, 2003 10:43 AM To: cormanlisp@xxxxxxxxxxxxxxx Subject: [cormanlisp] Re: CLOS+defstruct issues Kenny Tilton <ktilton@xxxxxxxxxx> writes: > 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) The problem is in Corman's defstruct. The classes generated by defstruct don't get appropriate class-precedence-lists. As you can see, the classes aaa and bbb are missing: (class-precedence-list (find-class 'ccc)) => (#<Standard-Class CCC #xF30C80> #<Standard-Class STRUCTURE #x1405498> #<Standard-Class T #x146DDC8>) This means that the method dispatch won't recognize ccc objects as instances of aaa or bbb. Strangely, this still works: (typep (make-ccc) 'bbb) => t Fix defstruct, and your method dispatch will work too. -- Frode Vatvedt Fjeld To unsubscribe from this group, send an email to: cormanlisp-unsubscribe@xxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ ------------------------ 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: cormanlisp-unsubscribe@xxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: CLOS+defstruct issues: 00070, Frode Vatvedt Fjeld |
|---|---|
| Next by Date: | Re: Re: CLOS+defstruct issues: 00070, Kenny Tilton |
| Previous by Thread: | Re: CLOS+defstruct issuesi: 00070, Frode Vatvedt Fjeld |
| Next by Thread: | Re: Re: CLOS+defstruct issues: 00070, Kenny Tilton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |