[Openmcl-devel] Spurious compiler warning?
Tim Bradshaw
tfb at tfeb.org
Fri Dec 9 02:36:16 PST 2011
On 8 Dec 2011, at 20:35, Bit Twiddler wrote:
> (defmethod transform-position ((transformation standard-translation) x y)
> (with-slots (dx dy) transformation
> (let ((x (coordinate x))
> (y (coordinate y)))
> (declare (type coordinate dx dy x y))
> (values (+ x dx) (+ y dy)))))
You need to declare the types where the "variable" (presumably symbol macro) is bound. So this should be, I think:
(defmethod transform-position ((transformation standard-translation) x y)
(with-slots (dx dy) transformation
(declare (type coordinate dx dy))
(let ((x (coordinate x))
(y (coordinate y)))
(declare (type coordinate x y))
(values (+ x dx) (+ y dy)))))
My CCL (trunk) is quiet for this.
More information about the Openmcl-devel
mailing list