0.8.0.71:
[sbcl.git] / tests / compiler.pure.lisp
index b56ba99..1178ab8 100644 (file)
 (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)))))))