X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=73f224b95314d96955fa174f05988ea8bcf827f0;hb=b2b5fc7797a2c34d904e2a6e25d9ff357d915ac6;hp=513ca2cbd0658061820c9c04c7797ba5049aa31b;hpb=4d31006db24db375cdb83a5726d66c524b36689c;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 513ca2c..73f224b 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -1197,6 +1197,18 @@ (with-test (:name :defmacro-not-list-lambda-list) (assert (raises-error? (eval `(defmacro ,(gensym) "foo")) type-error))) + +(with-test (:name :bug-308951) + (let ((x 1)) + (dotimes (y 10) + (let ((y y)) + (when (funcall (eval #'(lambda (x) (eql x 2))) y) + (defun bug-308951-foo (z) + (incf x (incf y z)))))) + (defun bug-308951-bar (z) + (bug-308951-foo z) + (values x))) + (assert (= 4 (bug-308951-bar 1)))) ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself