Changeset 242


Ignore:
Timestamp:
Jan 9, 2004, 1:25:20 PM (21 years ago)
Author:
Gary Byers
Message:

BAD-SLOT-TYPE errors.

Location:
trunk/ccl/level-1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-clos-boot.lisp

    r209 r242  
    22352235    (unless (or (eq new (%slot-unbound-marker))
    22362236                (funcall type-predicate new))
    2237       (setq new (require-type new type)))
     2237      (error 'bad-slot-type
     2238             :instance (slot-vector.instance slot-vector)
     2239             :datum new :expected-type type
     2240             :slot-definition slotd))
    22382241    (typecase loc
    22392242      (fixnum
  • trunk/ccl/level-1/l1-clos.lisp

    r210 r242  
    7474            (progn
    7575              (unless (funcall (standard-effective-slot-definition.type-predicate slotd) new-value)
    76                 (report-bad-arg new-value (%slot-definition-type slotd)))
     76                (error 'bad-slot-type-from-initarg
     77                       :slot-definition slotd
     78                       :instance instance
     79                       :datum new-value
     80                       :expected-type  (%slot-definition-type slotd)
     81                       :initarg-name (car foundp)))
    7782              (if (consp loc)
    7883                (rplacd loc new-value)
     
    9297                      (let* ((newval (funcall initfunction)))
    9398                        (unless (funcall (standard-effective-slot-definition.type-predicate slotd) newval)
    94                           (report-bad-arg newval (%slot-definition-type slotd)))
     99                          (error 'bad-slot-type-from-initform
     100                                 :slot-definition slotd
     101                                 :expected-type (%slot-definition-type slotd)
     102                                 :datum newval
     103                                 :instance instance))
    95104                        (if (consp loc)
    96105                          (rplacd loc newval)
Note: See TracChangeset for help on using the changeset viewer.