Parent's slot overwriting
Frank <[email protected]> Fri, 04 Jun 2010 12:30:17 -0600
| Newsgroups | gmane.emacs.eieio |
|---|---|
| Message-ID | <[email protected]> |
Hi, Please try this. I get an error if I try to evaluate the child class. Regards, Frank (require 'eieio) (defclass foo () ((field :type string))) (defclass bar () ((field :type wholenum))) ;; I get an error here. ;; Apparently there's a typecheck done for field. ;; ;; The documentation says: ;; If the new class has a slot with the same name as the parent, ;; the new slot overrides the parent's slot. ;; ;; Is this supposed to throw an error in this case? (defclass child (bar foo) ((field :type vector))) ;; This evaluates fine. ;; (defclass child (bar foo) ;; ((field :type wholenum))) ;; bar's field type matches child's field type ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo