X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=6c8ed83af94608eaa42dfac6f0ac1a7ef702db65;hb=99f12b8ef75252c8d2d52705b53f2a8f9227443a;hp=dad96e893bbea30e7347ba32546e50dfd8a76ebb;hpb=801730762f17302c33b70398b632aa1393c6722a;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index dad96e8..6c8ed83 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -942,6 +942,17 @@ (with-test (:name :complex-call-doesnt-warn) (handler-bind ((warning #'error)) (compile nil '(lambda (x) (complex-function-signature x :z1 1 :z2 2))))) + +(with-test (:name :non-required-args-update-info) + (let ((name (gensym "NON-REQUIRE-ARGS-TEST")) + (*evaluator-mode* :compile)) + (eval `(defun ,name (x) x)) + (assert (equal '(function (t) (values t &optional)) + (sb-kernel:type-specifier (sb-int:info :function :type name)))) + (eval `(defun ,name (x &optional y) (or x y))) + (assert (equal '(function (t &optional t) (values t &optional)) + (sb-kernel:type-specifier (sb-int:info :function :type name)))))) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself