X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-type.lisp;h=13e3368efd11a934662439c48d64fafdc9b8fb1c;hb=4255b37e50876702d2563f3418a44a3f5bf8a2e8;hp=56c8c7902219ff1bf7c6dd70e30e4aba86d7eb4c;hpb=9ca5f2d431133c37793fff74e1ecbd229574222d;p=sbcl.git diff --git a/src/code/late-type.lisp b/src/code/late-type.lisp index 56c8c79..13e3368 100644 --- a/src/code/late-type.lisp +++ b/src/code/late-type.lisp @@ -1731,7 +1731,7 @@ (eql low high) (eql (numeric-type-complexp type) :real) (member (numeric-type-class type) '(integer rational - #!-sb-xc-host float))) + #-sb-xc-host float))) (values t (numeric-type-low type)) (values nil nil)))) @@ -2903,11 +2903,12 @@ used for a COMPLEX component.~:@>" :high (if (null (numeric-type-high type1)) nil (list (1+ (numeric-type-high type1))))))) - (type-union type1 - (apply #'type-intersection - (remove (specifier-type '(not integer)) - (intersection-type-types type2) - :test #'type=)))) + (let* ((intersected (intersection-type-types type2)) + (remaining (remove (specifier-type '(not integer)) + intersected + :test #'type=))) + (and (not (equal intersected remaining)) + (type-union type1 (apply #'type-intersection remaining))))) (t (let ((accumulator *universal-type*)) (do ((t2s (intersection-type-types type2) (cdr t2s)))