Changeset 11491 for trunk/source/level-1


Ignore:
Timestamp:
Dec 9, 2008, 1:34:07 AM (11 years ago)
Author:
gb
Message:

Make $XNOTELT signal a TYPE-ERROR, mostly so that COERCE does so in this
case when "coercion isn't possible" (ticket:387).

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

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-error-signal.lisp

    r10875 r11491  
    9595                                  :datum (car errargs)
    9696                                  :format-control format-string))
     97                 (array-element-type-error
     98                  (let* ((array (cadr errargs)))
     99                    (make-condition condition-name
     100                                    :format-control format-string
     101                                    :datum (car errargs)
     102                                    :expected-type (array-element-type array)
     103                                    :array array)))
    97104                                 
    98105                 (t (make-condition condition-name
  • trunk/source/level-1/l1-error-system.lisp

    r10430 r11491  
    176176
    177177(define-condition simple-type-error (simple-condition type-error) ())
     178
     179(define-condition array-element-type-error (simple-type-error)
     180  ((array :initarg :array :reader array-element-type-error-array))
     181  (:report (lambda (c s)
     182             (format s (simple-condition-format-control c)
     183                     (type-error-datum c)
     184                     (array-element-type-error-array c)))))
     185                 
     186
    178187
    179188
     
    10511060        (cons $ximproperlist 'improper-list)
    10521061        (cons $xnospread 'cant-construct-arglist)
     1062        (cons $xnotelt 'array-element-type-error)
    10531063        ))
    10541064
Note: See TracChangeset for help on using the changeset viewer.