X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=34aa2a061a6d8f1da54e5f81cf32ab29d2a5ecc6;hb=0cff6b0b7e6f1d148586f81f620b9c86ed217caa;hp=6fcfb213dd3d29f3de037d2899218d9f6e43050d;hpb=35b9e99e66b856c11a7018f2345eebc6960bdd1f;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 6fcfb21..34aa2a0 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -2589,7 +2589,8 @@ "foo")))) (with-test (:name :base-string-aref-type) - (assert (eq 'base-char + (assert (eq #+sb-unicode 'base-char + #-sb-unicode 'character (funcall (compile nil '(lambda (s) (sb-c::compiler-derived-type (aref (the base-string s) 0)))) @@ -2644,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))))))