[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

with-slots bug?



Here's an example of where WITH-SLOTS does not seems to follow the
scoping rules in the spec.  

(pcl:defclass point
	      ()
     ((x :initform 0)
      (y :initform 0)))

(pcl:defmethod move ((point point) new-x new-y)
  (with-slots (x y) point
    (flet ((f (x)
	     (* x 2)))  ; X treated as (slot-value point 'x) here.
    (setf x (f new-x)
	  y (f new-y)))))