mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-17 06:42:18 -08:00
An type with an unsupported CONS type cannot be replaced by just CONS. Use T instead for type estimates in TYPE-AND/OR
This commit is contained in:
parent
044caf8c4d
commit
7ae84753e8
1 changed files with 10 additions and 6 deletions
|
|
@ -144,9 +144,11 @@
|
|||
(t
|
||||
`(AND ,t1 ,t2))))
|
||||
((eq tag1 'CONS)
|
||||
(type-and 'CONS t2))
|
||||
(cmpwarn "Unsupported CONS type ~S. Replacing it with T." t1)
|
||||
t2)
|
||||
((eq tag2 'CONS)
|
||||
(type-and t1 'CONS))
|
||||
(cmpwarn "Unsupported CONS type ~S. Replacing it with T." t2)
|
||||
t1)
|
||||
((null tag1)
|
||||
(cmpwarn "Unknown type ~S. Assuming it is T." t1)
|
||||
t2)
|
||||
|
|
@ -176,15 +178,17 @@
|
|||
(t
|
||||
`(OR ,t1 ,t2))))
|
||||
((eq tag1 'CONS)
|
||||
(type-or 'CONS t2))
|
||||
(cmpwarn "Unsupported CONS type ~S. Replacing it with T." t1)
|
||||
T)
|
||||
((eq tag2 'CONS)
|
||||
(type-or t1 'CONS))
|
||||
(cmpwarn "Unsupported CONS type ~S. Replacing it with T." t2)
|
||||
T)
|
||||
((null tag1)
|
||||
(cmpwarn "Unknown type ~S" t1)
|
||||
'T)
|
||||
T)
|
||||
(t
|
||||
(cmpwarn "Unknown type ~S" t2)
|
||||
'T))))
|
||||
T))))
|
||||
|
||||
(defun type>= (type1 type2)
|
||||
(subtypep type2 type1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue