subtypep giving inconsistent results on certain cons types
Bug #1694839 reported by
Paul F. Dietz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
If A is a subtype of B, then (NOT B) should be a subtype of (NOT A). If subtypep can determine the subtype relationship in both cases then they must be consistent. However:
(SUBTYPEP '(CONS INTEGER (CONS (REAL -3.3 4.4) (EQL 1)))
'(NOT (CONS T (CONS (NOT INTEGER) (EQL 0))))) => T, T
(SUBTYPEP '(NOT (NOT (CONS T (CONS (NOT INTEGER) (EQL 0)))))
'(NOT (CONS INTEGER (CONS (REAL -3.3 4.4) (EQL 1))))) => NIL, T
(SUBTYPEP '(CONS T (CONS (NOT INTEGER) (EQL 0)))
'(NOT (CONS INTEGER (CONS (REAL -3.3 4.4) (EQL 1))))) => NIL, T
This is in sbcl 1.3.18.
This is still occurring in 1.4.3.