X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=34aa2a061a6d8f1da54e5f81cf32ab29d2a5ecc6;hb=aa1a5c6ea31c248587d78f62943ad749ea8fbe2f;hp=0623c1f8c9ac0de54cbe1a91ee5bc580dd762700;hpb=30c93105a8bce7b701a5043fb11254f6f1bdd6da;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 0623c1f..34aa2a0 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -2645,3 +2645,22 @@ (destructuring-bind (a (b c) d) '(1 "foo" 4) (+ a b c d))))) :feh)))))) + +;;; Functions with non-required arguments used to end up with +;;; (&OPTIONAL-DISPATCH ...) as their names. +(with-test (:name :hairy-function-name) + (assert (eq 'read-line (nth-value 2 (function-lambda-expression #'read-line)))) + (assert (equal "#" (princ-to-string #'read-line)))) + +;;; PROGV + RESTRICT-COMPILER-POLICY +(with-test (:name :progv-and-restrict-compiler-policy) + (let ((sb-c::*policy-restrictions* sb-c::*policy-restrictions*)) + (restrict-compiler-policy 'debug 3) + (let ((fun (compile nil '(lambda (x) + (let ((i x)) + (declare (special i)) + (list i + (progv '(i) (list (+ i 1)) + i) + i)))))) + (assert (equal '(1 2 1) (funcall fun 1))))))