1.0.24.34: IR2: additional representation for predicates, conditional moves
[sbcl.git] / tests / compiler.pure.lisp
index 381bb2f..7dcc183 100644 (file)
   (compile nil '(lambda (x)
                  (declare (type (and simple-string (satisfies array-has-fill-pointer-p)) x))
                  (array-element-type x))))
+
+(with-test (:name :rest-list-type-derivation)
+  (multiple-value-bind (type derivedp)
+      (funcall (compile nil `(lambda (&rest args)
+                               (sb-c::compiler-derived-type args)))
+               nil)
+    (assert (eq 'list type))
+    (assert derivedp)))
+
+(with-test (:name :base-char-typep-elimination)
+  (assert (eq (funcall (lambda (ch)
+                         (declare (type base-char ch) (optimize (speed 3) (safety 0)))
+                         (typep ch 'base-char))
+                       t)
+              t)))