From 0efa9ec7b08b35a1968fa051fb130ab865c7fa1f Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 11 Sep 2009 15:35:56 +0000 Subject: [PATCH] 1.0.31.5: WITH-SLOTS on THE forms Thanks to David Tolpin. --- NEWS | 1 + src/pcl/boot.lisp | 2 +- tests/compiler.impure.lisp | 7 +++++++ version.lisp-expr | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 680e22f..b7294c6 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ changes relative to sbcl-1.0.31 options (reported by Faré Rideau, thanks to Zach Beane) * bug fix: (SETF SLOT-VALUE) signalled a warning which should have been an optimization note instead. (reported by Martin Cracauer) + * bug fix: WITH-SLOTS did not work with THE forms. (thanks to David Tolpin) changes in sbcl-1.0.31 relative to sbcl-1.0.30: * improvement: stack allocation is should now be possible in all nested diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index 90d8cfb..8deb6c8 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -2724,7 +2724,7 @@ bootstrapping. (defun extract-the (form) (cond ((and (consp form) (eq (car form) 'the)) - (aver (proper-list-of-length-p 3)) + (aver (proper-list-of-length-p form 3)) (third form)) (t form))) diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 1affc40..f410d4d 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -1159,6 +1159,13 @@ (make-something-known-to-be-a-struct :x "X" :y "Y") #\x #\y))) (assert (not (ctu:find-named-callees f))))) + +(defclass some-slot-thing () + ((slot :initarg :slot))) +(with-test (:name :with-slots-the) + (let ((x (make-instance 'some-slot-thing :slot "foo"))) + (with-slots (slot) (the some-slot-thing x) + (assert (equal "foo" slot))))) ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself diff --git a/version.lisp-expr b/version.lisp-expr index 5251bed..34e433e 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".) -"1.0.31.4" +"1.0.31.5" -- 1.7.10.4