Another type error

Christophe Rhodes <[email protected]> Wed, 04 Jun 2003 15:41:39 +0100
Newsgroups gmane.lisp.clx.devel
Message-ID <[email protected]>
SBCL catches another type error in CLX: this time in image.lisp.

(defun image-xy->image-z (image x y width height)
  (declare (type image-z image)
           (type card16 x y width height)
           (ignore image x y width height))
  (error "Format conversion from ~S to ~S not supported"
         :xy-pixmap :z-pixmap))

[...]

(defun copy-image (image &key (x 0) (y 0) width height result-type)
  ...
            (etypecase image
              ...
              (image-xy
                (ecase result-type
                  (image-x (image-xy->image-x image x y width height))
                  ((nil image-xy) (image-xy->image-xy image x y width height))
                  (image-z  (image-xy->image-z image x y width height))))
              ...)
  ...)

The type declaration in IMAGE-XY->IMAGE-Z should be
  (type image-xy image)
not
  (type image-z image)

Cheers,

Christophe
-- 
http://www-jcsu.jesus.cam.ac.uk/~csr21/       +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%")    (pprint #36rJesusCollegeCambridge)