Skip to content
Snippets Groups Projects
Commit 1e1b6260 authored by ram's avatar ram
Browse files

Changed type check weakening not to choose supertypes that are union types

(i.e. COMMON).  Also, we don't preserve the original check just because there
was some supertype predicate.
parent 84260e02
No related branches found
No related tags found
No related merge requests found
...@@ -106,10 +106,11 @@ ...@@ -106,10 +106,11 @@
(found-super nil)) (found-super nil))
(dolist (x *type-predicates*) (dolist (x *type-predicates*)
(let ((stype (car x))) (let ((stype (car x)))
(when (csubtypep type stype) (when (and (csubtypep type stype)
(setq found-super t) (not (union-type-p stype))) ;Not #!% COMMON type.
(let ((stype-cost (type-test-cost stype))) (let ((stype-cost (type-test-cost stype)))
(when (< stype-cost min-cost) (when (< stype-cost min-cost)
(setq found-super t)
(setq min-type stype min-cost stype-cost)))))) (setq min-type stype min-cost stype-cost))))))
(if found-super (if found-super
min-type min-type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment