Update of /cvsroot/sbcl/sbcl/tests
In directory usw-pr-cvs1:/tmp/cvs-serv10001/tests
Modified Files:
compiler.pure.lisp
Log Message:
0.7.4.6:
fixed bug 169 as per David Lichteblau sbcl-devel 2002-05-21
Index: compiler.pure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/compiler.pure.lisp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- compiler.pure.lisp 7 Feb 2002 20:37:54 -0000 1.5
+++ compiler.pure.lisp 29 May 2002 15:51:26 -0000 1.6
@@ -85,3 +85,32 @@
(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))))
|