master: /=: check all arguments for NUMBER before returning NIL

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  41a13309df2a4b42c439c5a133962634a9ce9654 (commit)
      from  bf6f4d7ae022468155ac0e7480dd22925b6bbc18 (commit)

- Log -----------------------------------------------------------------
commit 41a13309df2a4b42c439c5a133962634a9ce9654
Author: Stas Boukarev <[email protected]>
Date:   Fri Apr 10 23:12:50 2026 +0300

    /=: check all arguments for NUMBER before returning NIL
---
 src/code/numbers.lisp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/code/numbers.lisp b/src/code/numbers.lisp
index eb298f43b..800e2117a 100644
--- a/src/code/numbers.lisp
+++ b/src/code/numbers.lisp
@@ -872,11 +872,14 @@ The second returned value is the remainder."
   (declare (number number) (explicit-check))
   (if more-numbers
       (do ((n number (nth i more-numbers))
-            (i 0 (1+ i)))
+           (i 0 (1+ i)))
           ((>= i (length more-numbers))
            t)
         (do-rest-arg ((n2) more-numbers i)
           (when (= n n2)
+            ;; Type check the remaining numbers before returning NIL
+            (do-rest-arg ((n) more-numbers (1+ i))
+              (the number n))
             (return-from /= nil))))
       t))
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.