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

problem with 7-7 version: setfs inside with-slots

I came across the following bug in testing the new (7-7) version of pcl in
lucid common lisp 3.0:  

When using the with slots macro, setf's don't seem to get handled right.  When
I try to setf one slot to a forms which has a symbol which should be bound to
another slot, I get an error.  Similar code worked ok on the 3-17 version, so
my guess is that something must have broken in with-slots or in the walker.

(defclass my-class () (slot1 slot2))

(defmethod broken ((x my-class))
  (with-slots (slot1 slot2) x
              (setf slot1 slot2)))

(defmethod works ((x my-class))
  (with-slots (slot1 slot2) x
              (let ((v2 slot2))
                (setf slot1 v2))))        

Dave Duff       
GE Research and Development Center
Schenectady, New York   518-387-5649