X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ftype.pure.lisp;h=919d7053e0172941c55cb5bf3a8ca78817b9e135;hb=6d9e2243954872457115bbb9ac1ecb1d161acced;hp=4e3ca06eca0b5f67a2d27f68454b00e29c6444fa;hpb=53f576d7d796e37a9c51c3c3296341458f046c44;p=sbcl.git diff --git a/tests/type.pure.lisp b/tests/type.pure.lisp index 4e3ca06..919d705 100644 --- a/tests/type.pure.lisp +++ b/tests/type.pure.lisp @@ -420,3 +420,23 @@ ACTUAL ~D DERIVED ~D~%" (let ((i (sb-c::values-type-intersection x y))) (assert (sb-c::type= i (sb-c::values-type-intersection i x))) (assert (sb-c::type= i (sb-c::values-type-intersection i y)))))))) + +(with-test (:name :bug-485972) + (assert (equal (multiple-value-list (subtypep 'symbol 'keyword)) '(nil t))) + (assert (equal (multiple-value-list (subtypep 'keyword 'symbol)) '(t t)))) + +;; WARNING: this test case would fail by recursing into the stack's guard page. +(with-test (:name :bug-883498) + (sb-kernel:specifier-type + `(or (INTEGER -2 -2) + (AND (SATISFIES FOO) (RATIONAL -3/2 -3/2))))) + +;; The infinite recursion mentioned in the previous test was caused by an +;; attempt to get the following right. +(with-test (:name :quirky-integer-rational-union) + (assert (subtypep `(or (integer * -1) + (and (rational * -1/2) (not integer))) + `(rational * -1/2))) + (assert (subtypep `(rational * -1/2) + `(or (integer * -1) + (and (rational * -1/2) (not integer))))))