From 161a3fefb7d4536f987b91c75667e70f95256f8c Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sun, 21 Oct 2012 13:19:32 +0200 Subject: [PATCH] Fix type propagator for LOGAND --- src/cmp/cmpopt-bits.lsp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cmp/cmpopt-bits.lsp b/src/cmp/cmpopt-bits.lsp index e97bdde2c..f097e195d 100644 --- a/src/cmp/cmpopt-bits.lsp +++ b/src/cmp/cmpopt-bits.lsp @@ -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)))