0.7.4.6:
authorWilliam Harold Newman <william.newman@airmail.net>
Wed, 29 May 2002 15:51:24 +0000 (15:51 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Wed, 29 May 2002 15:51:24 +0000 (15:51 +0000)
fixed bug 169 as per David Lichteblau sbcl-devel 2002-05-21

BUGS
NEWS
src/compiler/ir1tran.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index ad7b82a..409cdf8 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1230,25 +1230,6 @@ WORKAROUND:
   Since this is a reasonable user error, it shouldn't be reported as 
   an SBCL bug. 
 
-169:
-  (reported by Alexey Dejneka on sbcl-devel 2002-05-12)
-  * (defun test (n)
-      (let ((*x* n))
-        (declare (special *x*))
-        (getx)))
-  ; in: LAMBDA NIL
-  ;     (LET ((*X* N))
-  ;     (DECLARE (SPECIAL *X*))
-  ;     (GETX))
-  ;
-  ; caught STYLE-WARNING:
-  ;   using the lexical binding of the symbol *X*, not the
-  ; dynamic binding, even though the symbol name follows the usual naming
-  ; convention (names like *FOO*) for special variables
-  ; compilation unit finished
-  ;   caught 1 STYLE-WARNING condition
-  But the code works as it should. Checked in 0.6.12.43 and later.
-
 171:
   (reported by Pierre Mai while investigating bug 47):
     (DEFCLASS FOO () ((A :SILLY T))) 
diff --git a/NEWS b/NEWS
index 7ba2cfe..8e76c9b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1129,6 +1129,11 @@ changes in sbcl-0.7.4 relative to sbcl-0.7.3:
 changes in sbcl-0.7.5 relative to sbcl-0.7.4:
   * bug 140 fixed: redefinition of classes with different supertypes
     is now reflected in the type hierarchy. (thanks to Pierre Mai)
+  * bug 169 fixed: no more bogus warnings about using lexical bindings
+    despite the presence of perfectly good SPECIAL declarations. (thanks
+    to David Lichteblau)
+  * bug fix: Structure type predicate functions now check their argument
+    count as they should.
   * minor incompatible change: The LOAD function no longer, when given
     a wild pathname to load, loads all files matching that pathname;
     instead, an error of type FILE-ERROR is signalled.
index fd63e74..19c2f89 100644 (file)
                              :where-from (leaf-where-from specvar)
                              :specvar specvar)))
          (t
-          (note-lexical-binding name)
           (make-lambda-var :%source-name name)))))
 
 ;;; Make the default keyword for a &KEY arg, checking that the keyword
index b911c4f..73a6c7d 100644 (file)
                    (list x)))))
   (assert (null value))
   (assert (typep error 'error)))
+
+;;; bug 169 (reported by Alexey Dejneka 2002-05-12, fixed by David
+;;; Lichteblau 2002-05-21)
+(progn
+  (multiple-value-bind (fun warnings-p failure-p)
+      (compile nil
+              ;; Compiling this code should cause a STYLE-WARNING
+              ;; about *X* looking like a special variable but not
+              ;; being one.
+              '(lambda (n)
+                 (let ((*x* n))
+                   (funcall (symbol-function 'x-getter))
+                   (print *x*))))
+    (assert (functionp fun))
+    (assert warnings-p)
+    (assert (not failure-p)))
+  (multiple-value-bind (fun warnings-p failure-p)
+      (compile nil
+              ;; Compiling this code should not cause a warning
+              ;; (because the DECLARE turns *X* into a special
+              ;; variable as its name suggests it should be).
+              '(lambda (n)
+                 (let ((*x* n))
+                   (declare (special *x*))
+                   (funcall (symbol-function 'x-getter))
+                   (print *x*))))
+    (assert (functionp fun))
+    (assert (not warnings-p))
+    (assert (not failure-p))))
index db90783..ba0edd8 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.4.5"
+"0.7.4.6"