Unexpected behaviour in find for sbcl 1.4.16 and later
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The function find does not return anything when it is called the same way as below
Example:
CL-USER> (let ((n nil))
(setq n 1.2) (find n '((1.2)) :key #'car))
NIL
The behaviour is present in SBCL version 1.4.16 and higher. The version 1.3.0 works properly.
It returns the proper value when n is initialized to the same element as the sequence, when the test #'eql is explicitly called or when the sequence is (list (list ..)).
Example:
CL-USER> (let ((n 1.2))
(setq n 1.2) (find n '((1.2)) :key #'car)) ;; initialize n as 1.2
(1.2)
CL-USER> (let ((n nil))
(setq n 1.2) (find n '((1.2)) :key #'car :test (lambda (x y) (eql x y)))) ;; Explicitly call the test
(1.2)
CL-USER> (let ((n nil))
(setq n 1.2) (find n (list (list 1.2)) :key #'car)) ;;change the tick for lists
(1.2)
It is possible to reproduce the same problem without double floats
CL-USER> (let ((n nil))
(setq n #xFFFFFFFFFFFFFFFF)
(find n '((#xFFFFFFFFFF
NIL
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
ee82b69af93c080 3516035413a049c f087c08f1d