mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
Fix type propagator for LOGAND
This commit is contained in:
parent
4b19fb3f60
commit
161a3fefb7
1 changed files with 8 additions and 6 deletions
|
|
@ -75,9 +75,11 @@
|
|||
;;; TYPE PROPAGATION
|
||||
;;;
|
||||
|
||||
(def-type-propagator logand (a b)
|
||||
(let ((output (dolist (int-type '((UNSIGNED-BYTE 8) FIXNUM) 'INTEGER)
|
||||
(when (or (subtypep a int-type)
|
||||
(subtypep b int-type))
|
||||
(return int-type)))))
|
||||
(values (list a b) output)))
|
||||
(def-type-propagator logand (&rest args)
|
||||
(values args
|
||||
(if args
|
||||
(dolist (int-type '((UNSIGNED-BYTE 8) FIXNUM) 'integer)
|
||||
(when (loop for value in args
|
||||
always (subtypep value int-type))
|
||||
(return int-type)))
|
||||
'fixnum)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue