* incremented fasl file version number due to the change in the
DEFSTRUCT-SLOT-DESCRIPTION structure.
+changes in sbcl-0.7.14 relative to sbcl-0.7.13:
+ * fixed some bugs revealed by Paul Dietz' test suite:
+ ** a bug in the CONS type specifier, whereby the CAR and CDR
+ types got intertwined, has been fixed;
+ ** the type system is now able to reason about the interaction
+ between INTEGER and RATIO types more completely;
+
planned incompatible changes in 0.7.x:
* (not done yet, but planned:) When the profiling interface settles
down, maybe in 0.7.x, maybe later, it might impact TRACE. They both
(intersection2 (type-intersection2 type1
complement-type2)))
(if intersection2
- (values (eq intersection2 *empty-type*) t)
+ ;; FIXME: if uncertain, maybe try arg1?
+ (type= intersection2 *empty-type*)
(invoke-complex-subtypep-arg1-method type1 type2))))
(!define-type-method (negation :complex-subtypep-arg1) (type1 type2)
((and (not (intersection-type-p type1))
(%intersection-complex-subtypep-arg1 type2 type1))
type1)
+ ;; KLUDGE: This special (and somewhat hairy) magic is required
+ ;; to deal with the RATIONAL/INTEGER special case. The UNION
+ ;; of (INTEGER * -1) and (AND (RATIONAL * -1/2) (NOT INTEGER))
+ ;; should be (RATIONAL * -1/2) -- CSR, 2003-02-28
+ ((and (csubtypep type2 (specifier-type 'ratio))
+ (numeric-type-p type1)
+ (csubtypep type1 (specifier-type 'integer))
+ (csubtypep type2
+ (make-numeric-type
+ :class 'rational
+ :complexp nil
+ :low (if (null (numeric-type-low type1))
+ nil
+ (list (1- (numeric-type-low type1))))
+ :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=))))
(t
(let ((accumulator *universal-type*))
(do ((t2s (intersection-type-types type2) (cdr t2s)))