|
conc-name nil + include => bug: msg#00053lisp.corman
Here is a simpler way to get the bug mentioned yesterday: (in-package :cl-user) (defstruct (aaa (:conc-name nil)) xxx) (defstruct (bbb (:include aaa) (:conc-name nil)) yyy) #+test (let ((a (make-aaa :xxx 1))) (setf (xxx a) 2)) The last form produces: ;;; An error occurred in function CHECK-STRUCT-TYPE: ;;; Error: The object #S( AAA :XXX 1 ) is not a BBB structure ;;; Entering Corman Lisp debug loop. ;;; Use :C followed by an option to exit. Type :HELP for help. ;;; Restart options: ;;; 1 Abort to top level. Please note I am only guessing that it is related to conc-name nil. My theory is that the last struct encountered gets mutators genned for each slot including those inherited (makes sense). without a conc-name or auto-prefixing with struct-name, multiple defun (setf xxx)...)s are being generated, and clealry the last one generated is the one that sticks (these are defuns so there can be only one). The last one generated includes a (check-struct-type...) for the last (most specific) struct encountered. So setf's of that struct slot for any but the most specific struct will fail there. reminder: CLisp does exactly the same (tho the /name/ of the checker is diff than check-struct-type). -- 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: 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: | CHECK-STRUCT-TYPE: 00053, Kenny Tilton |
|---|---|
| Next by Date: | Re: conc-name nil + include => bug: 00053, Kenny Tilton |
| Previous by Thread: | CHECK-STRUCT-TYPEi: 00053, Kenny Tilton |
| Next by Thread: | Re: conc-name nil + include => bug: 00053, Kenny Tilton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |