X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=1178ab839335af97f9975b7a8ea26321e7b128c9;hb=a070a6a472f050b4ca1346f047b7577fc407217d;hp=b56ba99d4b8f64429e8657172a691627344cf5d8;hpb=a72b7117e8f2a832f85bf18f21dbbd8e804211ec;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index b56ba99..1178ab8 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -423,3 +423,20 @@ (assert (nth-value 2 (compile nil '(lambda () (svref (make-array '(8 9) :adjustable t) 1))))) + +;;; CHAR= did not check types of its arguments (reported by Adam Warner) +(raises-error? (funcall (compile nil '(lambda (x y z) (char= x y z))) + #\a #\b nil) + type-error) +(raises-error? (funcall (compile nil + '(lambda (x y z) + (declare (optimize (speed 3) (safety 3))) + (char/= x y z))) + nil #\a #\a) + type-error) + +;;; Compiler lost return type of MAPCAR and friends +(dolist (fun '(mapcar mapc maplist mapl)) + (assert (nth-value 2 (compile nil + `(lambda (x) + (1+ (,fun #'print x)))))))