X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ftype.pure.lisp;h=5c570c916e9fcebd225bb88ce43fecd000add28f;hb=05449b9101cdf156f48e7cf935d3874dc7cbadeb;hp=218840767cc8e0a7eca6857197fc2d659419c414;hpb=58ff25d134554f86b15d1978ae21861ccbe70f3d;p=sbcl.git diff --git a/tests/type.pure.lisp b/tests/type.pure.lisp index 2188407..5c570c9 100644 --- a/tests/type.pure.lisp +++ b/tests/type.pure.lisp @@ -181,6 +181,15 @@ ;;; return is NIL, T, because that's completely wrong. ] (assert (subtypep '(or integer ratio) 'rational)) (assert (subtypep 'rational '(or integer ratio))) -;;; Likewise, these are allowed to return NIL, NIL: +;;; Likewise, these are allowed to return NIL, NIL, but shouldn't +;;; return NIL, T: (assert (subtypep t '(or real (not real)))) (assert (subtypep t '(or keyword (not keyword)))) +(assert (subtypep '(and cons (not (cons symbol integer))) + '(or (cons (not symbol) *) (cons * (not integer))))) +(assert (subtypep '(or (cons (not symbol) *) (cons * (not integer))) + '(and cons (not (cons symbol integer))))) +(assert (subtypep '(or (eql 0) (rational (0) 10)) + '(rational 0 10))) +(assert (subtypep '(rational 0 10) + '(or (eql 0) (rational (0) 10))))