>>>>> "dvl" == Didier Verna <[EMAIL PROTECTED]> writes:

    dvl>        Hi again,

    dvl> Section "2.23.2 Slot Type Checking" continues to puzzle me, especially
    dvl> the fact that you have to be within *methods* for the :type slot option
    dvl> to be taken in consideration when writing something to a slot. For
    dvl> instance, with:

    dvl> (defclass foo ()
    dvl>   ((a :type fixnum)))

    dvl> (defvar *object* (make-instance 'foo))
    dvl> (setf (slot-value *object* 'a) 3.5)    ;; this works like a charm


I think I have this fixed now:

(defclass foo ()
  ((a :type fixnum)))

(defclass bar ()
  ((a :type fixnum :initform 0)))

(make-instance 'foo) -> signals error because a isn't initialized with
a fixnum

(defvar *object* (make-instance 'bar))

(setf (slot-value *object* 'a) 3.5) -> signals error

I will need to run some tests and stuff, but if all goes well, it will
be included soon (but probably not in time for the Dec snapshot).

Ray

Reply via email to