From 617079f738359a0d58282badfd49982a263c15dc Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Sun, 6 Mar 2005 10:33:28 +0000 Subject: [PATCH] 0.8.20.7: While we are discussing SB-WALKER, bug 276 has risen again: * fix a case with M-V-SETQ; * record a problem with global variables. --- BUGS | 8 ++++++++ NEWS | 3 +++ src/pcl/boot.lisp | 2 +- tests/clos.impure.lisp | 4 ++++ version.lisp-expr | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/BUGS b/BUGS index 13c82f1..24a3d3c 100644 --- a/BUGS +++ b/BUGS @@ -887,6 +887,14 @@ WORKAROUND: (fixed in 0.8.2.51, but a test case would be good) +276: + b. The same as in a., but using MULTIPLE-VALUE-SETQ instead of SETQ. + c. (defvar *faa*) + (defmethod faa ((*faa* double-float)) + (set '*faa* (when (< *faa* 0) (- *faa*))) + (1+ *faa*)) + (faa 1d0) => type error + 278: a. (defun foo () diff --git a/NEWS b/NEWS index 36f03f1..d87b9e5 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ changes in sbcl-0.8.21 (0.9alpha.1?) relative to sbcl-0.8.20: (reported by Lutz Euler) * fixed bug: (TYPEP X '(MEMBER ...)) no longer returns a list in compiled code. (reported by Paul Dietz) + * fixed bug 276b: mutating with MULTIPLE-VALUE-SETQ a binding of a + specialized parameter to a method to something that is not TYPEP + the specializer is now possible. * contrib improvement: the SB-SIMPLE-STREAMS contrib now defines STRING-SIMPLE-STREAM and FILE-SIMPLE-STREAM as subclasses of STRING-STREAM and FILE-STREAM, respectively. diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index b49a1ab..638f6a9 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -1266,7 +1266,7 @@ bootstrapping. ((eq (car form) 'next-method-p) (setq next-method-p-p t) form) - ((eq (car form) 'setq) + ((memq (car form) '(setq multiple-value-setq)) ;; FIXME: this is possibly a little strong as ;; conditions go. Ideally we would want to detect ;; which, if any, of the method parameters are diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 89fd5bb..e157330 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -843,6 +843,10 @@ (write-line "Break, you sucker!" *faa*) 'ok) (assert (eq 'ok (faa (make-string-output-stream)))) +(defmethod fex ((x fixnum) (y fixnum)) + (multiple-value-setq (x y) (values (/ x y) (/ y x))) + (list x y)) +(assert (equal (fex 5 3) '(5/3 3/5))) ;;; Bug reported by Zach Beane; incorrect return of (function ;;; ',fun-name) in defgeneric diff --git a/version.lisp-expr b/version.lisp-expr index ae1b536..70e1265 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.20.6" +"0.8.20.7" -- 1.7.10.4