X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-type.lisp;h=13e3368efd11a934662439c48d64fafdc9b8fb1c;hb=4255b37e50876702d2563f3418a44a3f5bf8a2e8;hp=2ae43c52f4e8315dc5ff993fb6271263e48ce627;hpb=30a7667ec095ac9b78a826c445b9af78c9c183ba;p=sbcl.git diff --git a/src/code/late-type.lisp b/src/code/late-type.lisp index 2ae43c5..13e3368 100644 --- a/src/code/late-type.lisp +++ b/src/code/late-type.lisp @@ -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)))