0.7.13.25:
authorAlexey Dejneka <adejneka@comail.ru>
Wed, 12 Mar 2003 12:44:03 +0000 (12:44 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Wed, 12 Mar 2003 12:44:03 +0000 (12:44 +0000)
        Fixed bug reported by Rolf Wester on comp.lang.lisp:
        DEFPARAMETER and DEFVAR now always assign a dynamic variable.

NEWS
src/code/defboot.lisp
tests/eval.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index fc6bd66..7aae843 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1601,6 +1601,8 @@ changes in sbcl-0.7.14 relative to sbcl-0.7.13:
        on malformed property lists;
   * fixed SXHASH, giving different results for NIL depending on type
     declarations (SYMBOL or LIST). (thanks to Gerd Moellmann)
+  * fixed bug in DEFPARAMETER and DEFVAR: they could assign a lexical
+    variable. (found by Rolf Wester)
 
 planned incompatible changes in 0.7.x:
   * (not done yet, but planned:) When the profiling interface settles
index e2bd2c2..46ed79e 100644 (file)
      (declaim (special ,var))
      ,@(when valp
         `((unless (boundp ',var)
-            (setq ,var ,val))))
+            (set ',var ,val))))
      ,@(when docp
         `((setf (fdocumentation ',var 'variable) ',doc )))
      ',var))
   string for the parameter."
   `(progn
      (declaim (special ,var))
-     (setq ,var ,val)
+     (set ',var ,val)
      ,@(when docp
         `((setf (fdocumentation ',var 'variable) ',doc)))
      ',var))
index f7803ff..d0f768b 100644 (file)
 
 (assert (constantp (find-class 'symbol)))
 (assert (constantp #p""))
+
+;;; DEFPARAMETER must assign a dynamic variable
+(let ((var (gensym)))
+  (assert (equal (eval `(list (let ((,var 1))
+                                (defparameter ,var 2)
+                                ,var)
+                              ,var))
+                 '(1 2))))
+
 \f
 ;;; success
 (sb-ext:quit :unix-status 104)
index 667dfce..b9dcdab 100644 (file)
@@ -18,4 +18,4 @@
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.13.24"
+"0.7.13.25"