[Openmcl-devel] Spurious compiler warning?

Bit Twiddler bitwiddler at gmail.com
Fri Dec 9 17:17:08 UTC 2011


Thanks, that seems to work on 1.6.



On 12/9/11, Tim Bradshaw <tfb at tfeb.org> wrote:
> 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