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

bug in WITH-SLOTS macro



Consider the following
(macroexpand-1 '(PCL:WITH-SLOTS (FROM) SELF
		  (multiple-value-setq (a b) (foo from))))
(LET ((#:G16320 SELF))
  (DECLARE (PCL:VARIABLE-REBINDING #:G16320 SELF))
  #:G16320
  (MULTIPLE-VALUE-BIND (#:G16321 #:G16322)
      (FOO (SLOT-VALUE #:G16320 'FROM))
    (SETQ A #:G16321)
    (SETQ B #:G16322)))

According to CLtL, MULTIPLE-VALUE-SETQ returns the FIRST value returned
by its body -- that is, the value that A gets set to.
This expansion produces a form that returns (in this case) the SECOND 
value -- the value that B is set to.

I am running symbolics genera 7.2 (no cute name) PCL.
It looks like the problem is in EXPAND-WITH-SLOTS-INTERNAL in BOOT.LISP,
and is probably not symbolics-specific.

Neil