Incorrect result from EQUALP with type declarations

Bug #1732225 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
High
Unassigned

Bug Description

(defun f21 (s1 s2)
  (let* ((lam
          `(lambda (p1 p2)
             (declare (type (member ,s1 nil 1 #\l) p1)
                      (type (member ,s2 #\p -6) p2))
             (equalp p1 p2))))
    (funcall (compile nil lam) s1 s2)))

(f21 "b" "b") ==> NIL

(equalp "b" "b") ==> T

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Error, code should have been

(defun f21 (s1 s2)
  (let* ((lam
          `(lambda (p1 p2)
             (declare (type (member ,s1 nil \l) p1)
                      (type (member ,s2 #\p -6) p2))
             (equalp p1 p2))))
    (funcall (compile nil lam) s1 s2)))

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Augh

Incorrect result from EQUALP with type declarations Edit
Bug #1732225 reported by Paul F. Dietz 4 minutes ago
6
This bug affects you Edit
Affects Status Importance Assigned to Milestone

  SBCL

New

Undecided

  Unassigned

Also affects project (?) Also affects distribution/package
Edit
Bug Description

(defun f21 (s1 s2)
  (let* ((lam
          `(lambda (p1 p2)
             (declare (type (member ,s1 nil 1 #\l) p1)
                      (type (member ,s2 #\p -6) p2))
             (equalp p1 p2))))
    (funcall (compile nil lam) s1 s2)))

(f21 "b" "b") ==> NIL

(equalp "b" "b") ==> T
Add tags Tag help
See full activity log
Paul F. Dietz (paul-f-dietz) wrote a moment ago: #1

Error, code should have been

(defun f21 (s1 s2)
  (let* ((lam
          `(lambda (p1 p2)
             (declare (type (member ,s1 nil #\l) p1)
                      (type (member ,s2 #\p -6) p2))
             (equalp p1 p2))))
    (funcall (compile nil lam) s1 s2)))

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Stas Boukarev (stassats)
Revision history for this message
Stas Boukarev (stassats) wrote :

0a1435311b7f2c118b04c214aa6043757cb72dbf

Changed in sbcl:
status: Triaged → Fix Committed
assignee: Stas Boukarev (stassats) → nobody
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.