mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-17 23:02:31 -08:00
Rewrite SUBTYPEP so that it ignores recursive type declarations using CONS
This commit is contained in:
parent
49ed81bbf3
commit
2f9e993603
1 changed files with 5 additions and 0 deletions
|
|
@ -1090,6 +1090,11 @@ if not possible."
|
|||
;; are strictly supported.
|
||||
;;
|
||||
(defun register-cons-type (&optional (car-type '*) (cdr-type '*))
|
||||
;; The problem with the code below is that it does not suport infinite
|
||||
;; recursion. Instead we just canonicalize everything to CONS, irrespective
|
||||
;; of whether the arguments are valid types or not!
|
||||
(canonical-type 'CONS)
|
||||
#+(or)
|
||||
(let ((car-tag (if (eq car-type '*) -1 (canonical-type car-type)))
|
||||
(cdr-tag (if (eq cdr-type '*) -1 (canonical-type cdr-type))))
|
||||
(cond ((or (zerop car-tag) (zerop cdr-tag))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue